#include<stdio.h> int main() { int year; year=1900; while(year<=2000) { if(year%400==0||year%4==0&&year%100!=0) { printf("%d是闰年\n",year); year++; } else year++; } return 0; }
时间: 2024-12-29 04:22:01
#include<stdio.h> int main() { int year; year=1900; while(year<=2000) { if(year%400==0||year%4==0&&year%100!=0) { printf("%d是闰年\n",year); year++; } else year++; } return 0; }