返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;

  4. int main()
  5. {
  6.         int m,d,s;
  7.         coyt<<"請輸入生日月份";
  8.         cin>>m;
  9.         coyt<<"請輸入生日月份";
  10.         CIN>>d;
  11.         s=(m*2+d)%3;
  12.         if(s==1)
  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

#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==1)

        {

        cout<<"吉"<<endl;

        }

        else

        {

        cout<<"普通"<<endl;

        }

        system("pause");

        return 0;

}

TOP

返回列表