作业3.4

#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;
}

posted @ 2013-10-19 17:10  zhaoyang16  阅读(88)  评论(0编辑  收藏  举报