#include <stdio.h> int main() { int year ; printf("请输入今年是多少年?"); scanf("%d",&year); if(year%4==0&&year%100!=0||year%400==0) { printf("%s\n","今年是闰年"); } else { printf("%s\n","今年是平年"); } return 0; }
课后作业 判断年份