#include "stdio.h"
int main(int argc, const char *argv[])
{
int year;
printf("请输入你想验证是否为闰年的年份:\n");
scanf("%d", &year);
while(1)
{
if (year < 0 && 0 != year)
{
printf("请输入一个正确的整数年份\n");
scanf("%d", &year);
}
else
{
break;
}
}
if ((0 == (year% 4) && 0 != (year % 100)) || (0 == (year%400) ))
{
printf("你输入的年份%d是闰年\n", year);
}
else
{
printf("你输入的年份%d不是闰年\n",year);
}
return 0;
}
2.排序三个数
3求面积