hi all you great programmers!!!
i'm very new in C...this is my first class and struggling through it.
i'm having problem with writing this program about exponent.
here is what i got so far...please help...I'M VERY NEW AT C.
it didn't turn out what i expected....whats wrong?
#include<stdio.h>
int PowFun(int,int); // function prototype
int main()
{
int FirstNum,SecNum,total;
printf("please enter a number:");
scanf("%", &FirstNum);
printf("please enter another number:\n");
scanf("%d", &SecNum);
total=PowFun(FirstNum,SecNum);
printf("the integer to its power is%d", total);
return 0;
}
// the following is the function of PowFun
int PowFun(int x, int y)
{
int total;
total = x^y;
return (total);
}