#include <stdio.h>
int main(){
int year;
printf("please enter a year\n");
scanf("%d",&year);
if((year%4==0)&&(year%100!=0)||(year%400==0)){
printf("%d is a leap year\n",year);
}
else{
printf("%d isn't a leap year\n",year);
}
return 0;
}
#include <stdio.h>
int main(){
int year;
printf("please enter a year\n");
scanf("%d",&year);
if((year%4==0)&&(year%100!=0)||(year%400==0)){
printf("%d is a leap year\n",year);
}
else{
printf("%d isn't a leap year\n",year);
}
return 0;
}
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。