#8665: 這錯哪裡啊?


eric634a (F.D.)

學校 : 國立臺灣師範大學附屬高級中學
編號 : 39559
來源 : [114.25.25.160]
最後登入時間 :
2014-03-02 20:24:43
a003. 兩光法師占卜術 | From: [114.25.25.160] | 發表日期 : 2014-03-02 20:52

#include <iostream>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;

int main(int argc, char *argv[]) {
int m,d,s;
while(cin >> m >> d){
s=(m*2+d)%3;
if(s=0){
cout << "普通" << endl; 
}
else{
if(s=1){
cout << "吉" << endl;
}
else
cout << "大吉" << endl; 
}
}
return 0;
}
 
#8666: Re:這錯哪裡啊?


eric634a (F.D.)

學校 : 國立臺灣師範大學附屬高級中學
編號 : 39559
來源 : [114.25.25.160]
最後登入時間 :
2014-03-02 20:24:43
a003. 兩光法師占卜術 | From: [114.25.25.160] | 發表日期 : 2014-03-02 20:55

已解決   謝謝 

 
ZeroJudge Forum