2014C++cpp05章节(1954KB).pptVIP

  • 14
  • 0
  • 约1.5万字
  • 约 70页
  • 2018-04-01 发布于未知
  • 举报
* #includeiostream #includeiomanip using namespace std; int main() { int english,math,computer,se=0, sm=0, sc=0; double ae, am, ac; int i=0, ne=0, nm=0, nc=0; while (i=19) { cout“按英语, 数学, 计算机顺序输入第”; couti+1个学生成绩:; cinenglishmathcomputer; if((english0||english100)||(math0|| math100)||(computer0||computer100)) { cout成绩输入错误, 请重新输入endl; continue; } //判断输入的成绩是否有效 * se=se+english; //将有效成绩加入总成绩 sm=sm+math; sc=sc+computer; if (english60) ne++; if (math60) nm++; if (computer60) nc++; i++; //成绩个数加1 } ae=se/20.0; //计算平均成绩

文档评论(0)

1亿VIP精品文档

相关文档