返回列表 發帖
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.         int x;
  7.         cout << "英熊聯盟常識問答" << endl;
  8.         cout << "作答說明"<< endl;
  9.         cout << "題目共一題!!!全為選擇題,答案有1 2 3 4,輸入後按ENTER即可"<< endl;
  10.         cout << "題目:英雄聯盟德邦中最軟的人是?"<< endl;
  11.         cout << "答案一:歐拉夫 答案二:屁屁 答案三:索拉卡 答案四:泰達米爾"<< endl;
  12.         cout << "請作答:"<< endl;
  13.         cin >> x;
  14.         if(x == 1)
  15.         {
  16.                 cout << "恭喜答錯";
  17.         }
  18.           else if(x == 2)
  19.           {
  20.                   cout << "恭喜答錯";
  21.           }
  22.           else if(x == 3)
  23.           {
  24.                   cout << "恭喜答對";
  25.           }
  26.           else if(x == 4)
  27.           {
  28.                   cout << "恭喜答錯";
  29.           }
  30.           else
  31.           {
  32.                   cout << "不要亂打";
  33.           }
  34.         system ("pause");
  35.         return 0;
  36. }
複製代碼

TOP

返回列表