标签:实例 lib || int can else print clu include
#include <stdio.h>
#include <stdlib.h>
int main()
{
int nian=0;
printf("请输入年份:\n");
scanf("%d",&nian);
if((nian % 4 == 0 && nian % 100 != 0)||(nian % 400 == 0)) //判断条件
{
printf("%d是闰年\n",nian);
}
else
{
printf("%d不是闰年\n",nian);
}
return 0;
}
标签:实例 lib || int can else print clu include
原文地址:https://www.cnblogs.com/FangXu1998/p/12150715.html