int x, y;
while(scanf("%d%d",&x,&y)!=EOF )
{
switch((x*2+y)%3)
{
case 0 :
printf("普通\n");
break;
case 1 :
printf("吉\n");
break;
case 2 :
printf("大吉\n");
break;
}
}
int x, y,z;
while(scanf("%d%d",&x,&y)!=EOF )
{
z = (x*2+y)%3;
if(z==0) printf("普通\n");
if(z==1) printf("吉\n");
if(z==2) printf("大吉\n");
}
}
int x, y; while(scanf("%d%d",&x,&y)!=EOF ) { switch((x*2+y)%3) { case 0 : printf("普通\n"); break; case 1 : printf("吉\n"); break; case 2 : printf("大吉\n"); break; } }
int x, y,z; while(scanf("%d%d",&x,&y)!=EOF ) { z = (x*2+y)%3; if(z==0) printf("普通\n"); if(z==1) printf("吉\n"); if(z==2) printf("大吉\n"); } }
上面吧
如果z是0的話
上面判斷1次就跳開了
下面要判斷3次
如果下面改else if應該就一樣快了