title: Write Pow Function Without math.h in C
body: <p>Hi I want to write a code for a pow function without using math.h libary.</p>
  
  <p><strong>How is this code?how can i fix it when b&lt;0</strong></p>
  
  <pre><code>    int MyPow(int a,int b){
        if(b&lt;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)
      }
  </code></pre>