#include
bool isLeapYear(int year)
{
if(year%4==0 && year%100!=0 || year%400 == 0) //判断是否是闰年
return 1;
else
return 0;
}
int main()
{
printf("请输入测试的年份:\n");
int year;
scanf("%d",&year);
printf("%d\n",isLeapYear(year));
return 0;
}
main(){
int year = 2017
runnian(year)
}
fun runnian(int year){
if((year%4==0&&year%100!=0)||year%400==0)
return 1;
else
return 0;
}