这个函数类型应该怎么选?
恳请大神帮我看看我错在哪里了?#include<stdio.h>
int main()
{double pow1(double,int);
float p,r;
int n;
r=0.9;
n=10;
p=pow1(1+r,n);
printf("p=%f\n",p);
}
double pow1(double,int)
{double p;
for(n=1;n<=10;n++)
{p=p*(1+r);
printf("%f,第%d个数\n",p,n);
}
return(p);
}