标题:各位帮帮忙,请看看这个程序哪里错了
取消只看楼主
于军
Rank: 1
等 级:新手上路
帖 子:22
专家分:2
注 册:2010-3-4
结帖率:83.33%
已结贴  问题点数:20 回复次数:3 
各位帮帮忙,请看看这个程序哪里错了
#include<stdio.h>
main()
{int n;float ave=0;
printf("please input the number");
scanf("%d",n);
for
(
int i=1,score;
i<=n;
i++
)
{printf("the No.%d",i);
scanf("%d",score);
ave+=score;
}
ave/=i;
printf("the ave is%f",ave);}
搜索更多相关主题的帖子: please number 
2010-04-05 15:49
于军
Rank: 1
等 级:新手上路
帖 子:22
专家分:2
注 册:2010-3-4
得分:0 
用for编写一个如下程序:
输入几个数求平均值
2010-04-05 17:05
于军
Rank: 1
等 级:新手上路
帖 子:22
专家分:2
注 册:2010-3-4
得分:0 
#include<stdio.h>
main()
{int n;float ave=0;
printf("please input the number");
scanf("%d",&n);
for
(
int i=1,score;
i<=n;
i++
)
{printf("the No.%dis",i);
scanf("%d",&score);
ave+=score;
}
ave/=n;
printf("the ave is%f",ave);}
2010-04-05 17:10
于军
Rank: 1
等 级:新手上路
帖 子:22
专家分:2
注 册:2010-3-4
得分:0 
谢谢各位提醒,我已经解决了
2010-04-05 17:11



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-301752-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.783683 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved