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

TOP

返回列表