返回列表 發帖
回復 8# 吳東哲


    [code]#include <iostream>

#include <cstdlib>

using namespace std;

int main()

{

     int m, d, s;

         cout<<"請輸入生日月份: ";

         cin>>m;

         cout<<"請輸日生日日期: ";

         cin>>d;

         s=(m*2+d)%3;

         if(s==2)

         {

                 cout<<"大吉"<<endl;

         }

         else if(s==2)

         {

                 cout<<"吉"<<endl;

         }

         if(s==1)

         {

                 cout<<"普通"<<endl;

         }   

     system("pause");

     return 0;

}

TOP

回復 8# 吳東哲
  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

返回列表