#include<bits/stdc++.h> using namespace std; int main(){ vector<int> students; int x; int a=0,b=0,c=0; while(1){ cin >> x; if(x<=0){ break; } students.push_back(x); } for(int i=0;i<students.size();i++){ if(students[i]>=85){ a++; } else if(students[i]>=60 && students[i]<85){ b++; } else{ c++; } } printf(">=85:%d\n",a); printf("60-84:%d\n",b); printf("<60:%d",c); return 0; }
0.0分
0 人评分
蛇行矩阵 (C语言代码)浏览:752 |
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)浏览:523 |
C语言程序设计教程(第三版)课后习题10.2 (C语言代码)浏览:1465 |
A+B for Input-Output Practice (III) (C语言代码)浏览:569 |
字符串输入输出函数 (C语言代码)浏览:2495 |
杨辉三角 (C语言代码)浏览:484 |
图形输出 (C语言代码)浏览:944 |
A+B for Input-Output Practice (IV) (C语言代码)浏览:506 |
1063题 初学者,求帮忙看下,不知道哪错了浏览:232 |
纪念品分组 (C++代码)浏览:838 |