庚午 发表于 2013-8-27 23:33:40

帮忙看看是不是在实参和形参之间有问题

#include<stdio.h>
int main()
{
double power(double a,double b);
double x=2.0 , y = 3.0;
double result;
result = power(x,y);
printf("%lf raised to %lf is %lf\n",x,y,result);
}
double power(double a,double b)
{
double c = 1;
while(b<=6)
{
c = c*a;
b++;
}
return c;
}
页: [1]
查看完整版本: 帮忙看看是不是在实参和形参之间有问题