返回列表 發帖
  1. #include<iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.   int score;
  6.   cout<<"請輸入你的分數: ";
  7.   cin>>score;
  8.   if(score==100)
  9.   {
  10.   cout<<"你可以考雄中!";  
  11.   }else if(score>=90 and score<=100)
  12.   {
  13.   cout<<"好優喔!及格了!";
  14.   }else if(score>=80 and score<=89)
  15.   {
  16.   cout<<"你不錯喔!";
  17.   }else if(score>=70 and score<=79)
  18.   {
  19.   cout<<"你考乙?!我非宰了你不可!";
  20.   }else if(score>=60 and score<=69)
  21.   {
  22.   cout<<"你得丙?會被我打!";
  23.   }else if(score>=0 and score<=59)
  24.   {
  25.   cout<<"你居然得丁?";
  26.   }else
  27.   {
  28.   cout<<"輸入錯誤!";                     
  29.   }
  30.   cout<<endl;
  31.   system("pause");
  32.   return 0;
  33. }
複製代碼

TOP

返回列表