对,明白了,呵呵,谢谢!
重新再写了下: #include<stdio.h>
void main()
{ int year,leap;
leap=0; printf("input year:"); scanf("%d",&year); if(year%4==0&&year%400!=0||year%400==0) leap=1; else leap=0; if(leap==1) printf("%d is a leap year!\n",year); else printf("%d is a not leap year!\n",year);
}
谢谢指点。