#9141: VC++ 一直輸出吉


zxc8976 (拘束)

學校 : 臺北市私立開南高級商工職業學校
編號 : 40067
來源 : [1.162.46.1]
最後登入時間 :
2014-09-03 21:55:33
a003. 兩光法師占卜術 | From: [1.160.19.231] | 發表日期 : 2014-09-03 17:29

#include <iostream>


using namespace std;
int main()
{
int M;
int D;
int S;
while( cin>>M){

   
cin>>D;
S=(M*2+D)%3;
if(S=0)
cout<<"普通"<<endl;
else if(S=1)
cout<<"吉"<<endl;
    else
cout<<"大吉"<<endl;




}


   return 0;
}
 
#9241: Re:VC++ 一直輸出吉


hugo8642612 (Hugowwwwwww)

學校 : 國立中央大學
編號 : 38705
來源 : [1.172.169.191]
最後登入時間 :
2023-02-04 01:50:43
a003. 兩光法師占卜術 | From: [114.39.17.43] | 發表日期 : 2014-09-25 22:07

#include


using namespace std;
int main()
{
int M;
int D;
int S;
while( cin>>M){

   
cin>>D;
S=(M*2+D)%3;
if(S==0)
cout<<"普通"<
else if(S==1)
cout<<"吉"<
    else
cout<<"大吉"<




}


   return 0;
}


 
ZeroJudge Forum