Write Pow Function Without math.h in C [closed]
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Improve this question Hi I want to write a code for a pow function without using math.h libary. How is this code?how can i fix it when b<0 int MyPow(int a,int b){ if(b<0) return 1 / MyPow (a,-b) else if(b==0) return 1; else if(b==1) return a; else return a*MyPow(a,b-1) } 回答1: