判断一个年份是否为闰年,可是不知道为什么总有一个错误,求大神指导看看哪错了?
include<stdio.h>main()
{
int year
scanf("%d",&year)
printf("please input the year:")
if(year%400==0||(year%4==0&&year%100!=0))
printf("Y/n");
else
printf("N/n");
}
#include<stdio.h> main() { int year; scanf("%d",&year); printf("please input the year:"); if(year%400==0||(year%4==0&&year%100!=0)) printf("Y\n"); else printf("N\n"); }