#9522: 求助!我做不出来!


wozhishixiang (unknown)


我的代码是:

#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;

}

   if(S=1)

  {

      cout<<"吉"<<endl;

}

    if(S=2)

  {

  

      cout<<"大吉"<<endl;

}

}

return 0;

}

为什么错误?

(c++的) 

 

 

 

#9523: Re:求助!我做不出来!


ed77441 (My disappointment is immeasura...)


while(cin>>M,cin>>D) 改成 while(cin>>M>>D) 

if(S=0)改成 if(S==0)