返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int m;
  7.     int d;
  8.     int s;
  9.     cout<<"請輸入生日月份:";
  10.     cin>>m;
  11.     cout<<"請輸入生日日期:";
  12.     cin>>d;
  13.     s=(m*2+d)%3;
  14.     if(s==2)
  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.       return 0;
  28.       }     
複製代碼

TOP

返回列表