#include<stdio.h>
main()
{
int x
,b
;
printf("请输入一个年份");
scanf("%x",&x
);
if(x
%100==0)
{
if(x
%400==0)
b
=1;
else b
=0;
}
else
{
if(x
%4==0)
b
=1;
else b
=0;
}
switch(b
)
{
case 1:printf("这是闰年"); break;
case 0:printf("这不是闰年");
}
}
转载请注明原文地址: https://mac.8miu.com/read-483664.html