返回列表 發帖
  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);
  14.                 if(s==0)
  15.                 {
  16.                         cout<<"普通"<<endl;
  17.                        
  18.                 }       
  19.                 else if(s==1)
  20.                 {
  21.                         cout<<"吉"<<endl;
  22.                        
  23.                 }       
  24.                 else if(s==2)
  25.                 {
  26.                         cout<<"大吉"<<endl;
  27.                        
  28.                 }       
  29.                
  30.                 return 0;
  31.         }                       
  32. }
複製代碼

TOP

返回列表