#include<iostream>
using namespace std;
int main()
{
int score,level;
cout<<"請輸入你的成績:"<<endl;
cin>>score;
level = score/10;
switch(level)
{
case 10:
case 9:
case 8:
cout<<"甲等!";
break;
case 7:
cout<<"乙等";
break;
case 6:
cout<<"丙等!";
break;
case 5:
case 4:
case 3:
case 2:
case 1:
case 0:
cout<<"不及格!";
break;
default:
cout<<"X!!";
}
cout<<endl;
system("pause");
return 0;
}作者: t8155745 時間: 2011-10-8 16:13