#5103: 請教一下...


Aidirifter (AIdrifter)

學校 : 不指定學校
編號 : 18853
來源 : [218.163.2.109]
最後登入時間 :
2011-05-09 11:01:02
a003. 兩光法師占卜術 | From: [125.230.45.12] | 發表日期 : 2011-05-09 00:47

#include<iostream>
using namespace std;  
int main() {

     int M(0),D(0),S(0);
      
     cout<<"please enter M D"<<endl;
     
      while(cin>>M>>D){
     S=(M*2+D)%3;

     if(S==0) cout<<"普通"<<endl;
     if(S==1) cout<<"吉"<<endl;
     if(S==2) cout<<"大吉"<<endl;
     }

     return 0;
}

 

我在DEV C++  可以正常執行 搞不懂為什麼不對@@?

 
ZeroJudge Forum