~cpp #include<iostream> using namespace std; void main(){ int i; char a[5] ={0,}; do{ cout << "점수 입력:"; cin >> i; if(i==999) continue; else if(i<0 || i>100){ cout << "잘못 했습니다 다시 해주세요" <<endl; continue; } switch(i/10){ case 10: case 9: a[0] +=1; break; case 8: a[1] +=1; break; case 7: a[2] +=1; break; case 6: a[3] +=1; break; default: a[4] +=1; break; } }while(!(i==999)); for(i=0;i<4;i++) printf("%c:%d명\n",'A'+i,a[i]); printf("F:%d명\n",a[4]); }