#include <stdio.h>
int main(){
int n=1;
int a;
int y;
while(scanf("%d",&n)!=EOF){
if(n%4==0&&n%100!=0||n%400==0&&n%3200!=0){
printf("a leap year\n");
}else{
printf("a normal year \n");
}
if(n=0){
break;
}
}
}
#include
int main(){
int n=1;
int a;
int y;
while(scanf("%d",&n)!=EOF){
if(n%4==0&&n%100!=0||n%400==0&&n%3200!=0){
printf("a leap year\n");
}else{
printf("a normal year \n");
}
if(n=0){
break;
}
}
}
你輸入的零會先做運算
印出"a normal year \n"這段
再break