C++语言编程

[复制链接]
查看11 | 回复2 | 2009-7-4 16:56:17 | 显示全部楼层 |阅读模式
压到数组或者向量里去...然后弄个if判断一下...弄个计数器记下人数...输出一下...就可以了... +++++++++++++++++++++++++++++++++++++++记事本写的- -...于是它就可能会过不了编译...顺便有个头文件么有include...因为我拼不来...╮(╯_╰)╭...#include#includeusing namespace std;int main{vectorivec;vectoecount;int score=0;while(score!=0)
{
cin=70&&ivec=80&&ivec=90&&ivec<=100)
{
count[4]+=1;
}
}int total=0;for(int i=0;i=ivec[i+1])
{
temp1=ivec[i+1];
temp2=ivec;
}
else
{
temp1=ivec;
temp2=ivec[i+1];
}
}int average=0;average=total/(ivec.size()-1);cout<<"the average"<<average<<"the highest score"<<temp2<<"the lowest score"<<temp1<<endl;cout<<"~59"<<count[0]<<"60~69"<<count[1]<<"70~79"<<count[2]<<"80~89"<<count[3]<<"90~100"<<count[4]<<endl;return 0;}
回复

使用道具 举报

千问 | 2009-7-4 16:56:17 | 显示全部楼层
如此之简单你还不自己写写。。这个太容易了。。你先写吧。不会的贴上了。或者百度HI问我。这样有意义
回复

使用道具 举报

千问 | 2009-7-4 16:56:17 | 显示全部楼层
额,这个问题书上都有例题的你真晕 课后习题解答上有
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行