关于闰年问题?
#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);
}
这个程序我在VC++6.0编译,没有错,但不管输入什么都是“%d is a leap year!”这是什么问题啊?