int main()
{
int year = 0;
int count = 0;
for(year=1000; year<=2000; year++)
{
//判断闰年
if(((year%40)&&(year%100!=0))||(year%4000))
{
printf("%d “, year);
count++;
}
/if(year%40)
{
if(year%100 != 0)
{
count++;
printf("%d ", year);
}
}
if(year%4000)
{
count++;
printf("%d ", year);
}/
}
//
printf(”\ncount = %d\n", count);
return 0;
}
判断平年与闰年
最新推荐文章于 2024-01-19 10:26:41 发布