关于是否是闰年的问题。。
这个程序有设么问题吗???#include<stdio.h>
void main()
{
int year,leap;
scanf("year=%d",&year);
if(year%4==0)
{if(year%100==0)
{if(year%400==0)
leap=1;
else
leap=0;}
else
leap=1;}
else
leap=0;
if(leap=1)
printf("%d is a leap year\n",year);
else(leap=0);
printf("%d is not a leap year\n",year);
}
怎么结果都不对???