#include<stdio.h> int main(void) { int year; printf("Enter The year:"); scanf("%d",&year); while(year!=-1){ if((year%4==0&&year%100!=0)||(year%400==0)){ printf("The year is 闰年\n"); printf("Enter The year:"); scanf("%d",&year); } else{ printf("The year is not 闰年\n"); printf("Enter The year:"); scanf("%d",&year); } } return 0; }
转载于:https://www.cnblogs.com/cssmcf/p/3378734.html