#9652: 求救~為啥這樣解不出來?


andylee0129 (EGG)


他一直跟我說答案錯誤  我的答案是:普通吉(?)   正確是:普通
為啥會多一個? 
 
#include <stdio.h>
#include <stdlib.h> 
int main()
{
int M;
int D;
while(scanf("%d%d",&M,&D)!=EOF)
{
int S = (M*2+D)%3;
if(S==0)
{
printf("普通");
}
else if(S==1)
{
printf("吉");
}
else
{
printf("大吉");
}
}
return 0;
}

#9653: Re:求救~為啥這樣解不出來?


danny221085 (未知)


他一直跟我說答案錯誤  我的答案是:普通吉(?)   正確是:普通
為啥會多一個? 
 
#include
#include  
int main()
{
int M;
int D;
while(scanf("%d%d",&M,&D)!=EOF)
{
int S = (M*2+D)%3;
if(S==0)
{
printf("普通");
}
else if(S==1)
{
printf("吉");
}
else
{
printf("大吉");
}
}
return 0;
}

你沒有加換行


#9660: Re:求救~為啥這樣解不出來?


andylee0129 (EGG)


他一直跟我說答案錯誤  我的答案是:普通吉(?)   正確是:普通
為啥會多一個? 
 
#include
#include  
int main()
{
int M;
int D;
while(scanf("%d%d",&M,&D)!=EOF)
{
int S = (M*2+D)%3;
if(S==0)
{
printf("普通");
}
else if(S==1)
{
printf("吉");
}
else
{
printf("大吉");
}
}
return 0;
}

你沒有加換行


danny221085 喔喔謝謝~我忘了