C语言填空:判断平年还是闰年
#include<stdio.h> //判断指定年份是闰年还是平年 main() {int year; printf("请输入年数"); scanf("%d",【1】); if(【2】) printf("%d年是闰年",year); else if(year%【3】==0) printf("%d年是闰年",year); else printf("%d年是平年",year); }
#include<stdio.h> main() {int year; printf("请输入年数"); scanf("%d",&year); if(year%4==0&&year%100!=0) printf("%d年是闰年",year); else if(year%400==0) printf("%d年是闰年",year); else printf("%d年是平年",year); }