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

  4. int main ()
  5. {
  6.         while(true)
  7.         {
  8. int M, D ,S;
  9. cout<<"輸入一個月份:";
  10. cin>>M        ;
  11. cout<<"輸入一個日期:";
  12. cin>>D;
  13. S = (M * 2 + D)% 3;
  14. if (S == 0)
  15. {
  16.         cout<<"普通"<<endl;
  17. }
  18. else if(S == 1)

  19. {
  20.         cout<<"吉"<<endl;
  21. }
  22. else if (S == 2)
  23. {
  24.         cout<<"大吉"<<endl;
  25. }
  26. else
  27. {
  28.         cout<<"........."<<endl;
  29. }
  30.        
  31.                 system ("pause");
  32.         }
  33.         return 0;
  34. }
複製代碼

TOP

返回列表