只有語法上的錯誤,修改如下(紅字)
#include<cstdio>
int main ()
{
int m,d,s;
while (~scanf("%d%d",&m,&d))
s=(m*2+d)%3;
if (s==0)
printf ("普通\n");
else if (s==1)
printf ("吉\n");
else if (s==2)
printf ("大吉\n");
return 0;
}
#include <cstdio> 引入scanf printf等函數來使用,scanf引號的位子也不對,第一個參數為輸入的格式,為字串,後方依序填入要輸入的變數指標(&X),參數間以逗點隔開,用scanf判斷輸入結束可參考我之前的留言