~cpp #include <iostream> using namespace std; int main() { int i ; int num[5]={0} ; do{ cout << "점수를 입력하시오 : " ; cin >> i ; cout << endl; if ( i == 9999) break; // 9999입력시 숫자 포함 방지 switch ( i / 10 ) { case 9: num[0]++; break; case 8: num[1]++; break; case 7: num[2]++; break; case 6: num[3]++; break; case 10: num[0]++; break; default: num[4]++; } } while( i != 9999); cout << "A : " << num[0] << endl; cout << "B : " << num[1] << endl; cout << "C : " << num[2] << endl; cout << "D : " << num[3] << endl; cout << "F : " << num[4] << endl; system("pause"); return 0; }