返回列表 發帖

兩光法師占卜術

附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

  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)%4;
  12.     if(s==3)
  13.     {
  14.     cout<<"大吉"<<endl;
  15.     }
  16.     else if(s==2)
  17.     {
  18.     cout<<"吉"<<endl;
  19.     }
  20.     else if(s==1)
  21.     {
  22.         cout<<"普通"<<endl;
  23.     }
  24.     else
  25.     {
  26.         cout<<"凶"<<endl;
  27.     }
  28.     system("pause");
  29.     return 0;
  30. }
複製代碼

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

  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==1)
  17.         {
  18.                 cout<<"吉"<<endl;
  19.         }
  20.         if(s==0)
  21.         {
  22.                 cout<<"普通"<<endl;
  23.         }
  24.     system("pause");
  25.     return 0;
  26. }           
複製代碼

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

回復 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

#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

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

TOP

  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.         if(s==1)
  17.         {
  18.         cout<<"吉"<<endl;
  19.         }
  20.         if(s==0)
  21.         {
  22.         cout<<"普通"<<endl;
  23.         }
  24.        
  25.         system("pause");
  26.         return 0;
  27. }
複製代碼

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==2)
         {
                 cout<<"吉"<<endl;
         }
         if(s==1)
         {
                 cout<<"普通"<<endl;
         }   
     system("pause");
     return 0;
}

TOP

  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

  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

  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.    
  10.     cout<<"請輸入生日日期:";
  11.     cin>>d;
  12.    
  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.             cout<<"普通"<<endl;
  24.     }
  25.     system("pause");
  26.     return 0;
  27. }
複製代碼

TOP

  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==1)
  17.         {
  18.         cout<<"吉"<<endl;
  19.         }
  20.         else
  21.         {
  22.         cout<<"普通"<<endl;
  23.         }
  24.         system("pause");
  25.         return 0;
  26. }
複製代碼

TOP

  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

返回列表