1-100奇数平均数# include int main(){int i,sum1 = 0,sum2 = 0;float k = 0;for (i = 1; i

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/09 05:56:15

1-100奇数平均数# include int main(){int i,sum1 = 0,sum2 = 0;float k = 0;for (i = 1; i
1-100奇数平均数
# include
int main()
{
int i,sum1 = 0,sum2 = 0;
float k = 0;
for (i = 1; i

1-100奇数平均数# include int main(){int i,sum1 = 0,sum2 = 0;float k = 0;for (i = 1; i
2处错误
1 k = sum1 / sum 2; sum2 中加多了个空格 k = sum1 / sum2;
2 printf ("k = %f\n",k) //少了个分号 printf ("k = %f\n",k);