求a的n次方,不知道哪错了
#include<stdio.h>float mypow(float x,int y)
{float i=0,s=1;
for (int i=0; i<=y;i++)
s =s*x;
return(s)
}
main()
{
float a=0.5;
int n=5;
printf("%f",mypow(a,n));
getch();}
2015-06-14 17:48
2015-06-14 17:49
2015-06-15 21:04