为什么得不到正确结果??
下面这个程序运行后得不到正确结果,请各位不吝赐教#include <stdio.h>
void main()
{
double a,q; int z;
double preme(double a,int z);
printf("please input a and z\n");
scanf("%f,%d",&a,&z);
q=preme(a,z);
printf("q=%f",q);
system("pause");
}
double preme (double x,int n)
{
double s; int i;
i=1;
while(i<=n)
{s=x; x=x*x; i=i+1;}
return s;
}