返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. main()
  5. {
  6.         while(true)
  7.         {
  8.         int m, d, s;
  9.         cout << "請輸入你的生日月分:" << endl;
  10.         cin >> m;
  11.         cout << "請輸入你的生日日期:" << endl;
  12.         cin >> d;
  13.         s = (m * 2 + d) % 3;       
  14.         if (s == 0)
  15.         {
  16.                 cout << "普通" << endl;
  17.         }
  18.         else if (s == 1)
  19.         {
  20.                 cout << "吉" << endl;
  21.         }
  22.         else
  23.     {
  24.             cout << "大吉" << endl;
  25.     }
  26.         system("pause");
  27.         }
  28.         return 0;
  29. }
複製代碼

TOP

返回列表