C语言初学 判断闰年的问题

#include<stdio.h>

main( )

{  int   year , leap;

    scanf("%d",&year);             if((year%9==0&&year%100!=0)||(year%400==0))

    printf("%d is a leap year.\n",year);

    else printf("%d is not a leap year.\n",year);

}

posted @ 2015-03-26 07:53  李京泽  阅读(275)  评论(0编辑  收藏  举报