#6509: 高手幫一下!


hsieang (讓世界感受痛楚)


#include<iostream>
using namespace std;
int main()
{
 int M,D,S;
 cin>>M>>D; 
 S=(M*2+D)%3;
 if(S==0)
 {
  cout<<"普通";
 }
 else if(S==1)
 { 
  cout<<"吉";
 } 
 else if(S==2);
 { 
  cout<<"大吉";
 }
 system("pause"); 
 return 0;
}

哪裡錯了呢?

#6510: Re:高手幫一下!


linishan (L)


#include
using namespace std;
int main()
{
 int M,D,S;
 cin>>M>>D; 
 S=(M*2+D)%3;
 if(S==0)
 {
  cout<<"普通";
 }
 else if(S==1)
 { 
  cout<<"吉";
 } 
 else if(S==2);
 { 
  cout<<"大吉";
 }
 system("pause"); 
 return 0;
}

哪裡錯了呢?

沒有換行

cout << "" << endl; 

 

另外system拿掉