判断闰年

Posted zyz322

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了判断闰年相关的知识,希望对你有一定的参考价值。

#include "stdio.h"
void main()
{
int y;
printf("请输入年份
");
scanf("%d",&y);
if(y%4==0&&y%400==0)
printf("是闰年");
else
printf("不是闰年");

}

 

以上是关于判断闰年的主要内容,如果未能解决你的问题,请参考以下文章