#include<stdio.h>
int main ()
{ int year,a;
scanf("%d",&year);
if(year%400==0)
a=1;
else
{
if(year%4==0&&year%100!=0)
a=1;
else
a=0;
}
if(a==1){
printf("yes\n",year);
}
if(a==0){
printf("no\n",year);
}
return 0;
}
c语言练习:输入年份,判断闰年,是闰年输出year,不是则输出no
于 2022-03-17 08:51:10 首次发布