返回列表 發帖

兩光占卜師

  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.   
  12.   s=(m*2+d)%3;
  13.   if (s==0)
  14.   {
  15.      cout<<"普普通通"<<endl;      
  16.   }
  17.   else if (s==1)
  18.   {
  19.      cout<<"吉利"<<endl;  
  20.   }
  21.   else
  22.   {
  23.       cout<<"大吉大利"<<endl;
  24.   }
  25.   
  26.   system("pause");
  27.   return 0;   
  28. }
複製代碼
附件: 您需要登錄才可以下載或查看附件。沒有帳號?註冊

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

TOP

  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. int x;
  7. int y;
  8. int s;
  9. cout<<"這是一個占普程式"<<endl;
  10. cout<<"請輸入生日月份:"<<endl;
  11. cin>>x;
  12. cout<<"請輸入生日日期:"<<endl;
  13. cin>>y;
  14. s=(x*2+y)%3;
  15. if(s==0)
  16. {
  17. cout<<"您的運勢:普通"<<endl;
  18. }
  19. else if(s==1)
  20. {
  21. cout<<"您的運勢:好"<<endl;
  22. }
  23. else
  24. {
  25. cout<<"您的運勢:超好"<<endl;
  26. }
  27. system("pause");
  28. return 0;
  29. }
複製代碼

TOP

  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

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

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

TOP

返回列表