代码编译无错,可运行时为什么第二个for语句的结果没有运行出来::>_<:: ???
#include<stdio.h>#include<math.h>
int main()
{
int f,x=0;
f=x*x+2*x+5;
int g=7,p=17,t=3;
int i=0;
int y[10];double d[10];
for(x=0;x<4;x++)
{
y[i] = x*x+2*x+5;
printf("输出y=%d\n",y[i]);
d[i] = pow(g,y[i]);
printf("d[i]=%lf\n",d[i]);
}
double s[200],k[200];
for(s[i]=0;s[i]>0;s[i]++)
{
k[i]=pow(g,s[i]);
printf("k[i]=%lf\n",k[i]);
if(d[i] == pow(g,s[i]))
printf("s[i]=%lf\n",s[i]);
}
return 0;
}
[此贴子已经被作者于2016-4-25 22:51编辑过]