Function "pwr()" is not working properly : <p>I'm new to C and was just making a function "pwr()" to raise a number to the power which are both specified in the program within the parenthesis. A blank screen appears or it just gives a value of 0 and 1 to "First Number" and "Second Number:" respectively.</p>

<pre><code>#include&lt;stdio.h&gt;
int pwr( int, int);

int main(){
int num, numn;
num == pwr(5,2);
numn == pwr(2,5);
printf("First Number:%d\n",num);
printf("Second Number:%d\n", numn);
return 0;
}

int pwr(int c,int pr)
{
int res = 1;
int i=0;

if(pr&lt;0){
    printf("Imaginary\n");
    return 0;

}
for(i=0;i=pr;i++){
    res = res*c;
}
return res;
}
</code></pre>

<p>Can someone tell me my mistake.</p>
