晕倒怎么编译通不过呢?我太菜了...请大家看看
/*写一个程序,输入年份和月份,判断该年是否闫年,*//*并根据给出的月份判断是什么季节和该月有多少天?*/
#include <stdio.h>
void main()
{
int year,month,leap;
printf("请输入年份和月份");
scanf("%d%d",&year,&month);
leap=0;
if ((year%4==0&&year%100!==0)||(year%400!=0))
leap=1;
printf("输入的年份%s闰年\n",(lear=1?"是":"不是"));
switch (month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12: printf("%d月份共有31天\n",month);break;
case 4:
case 6:
case 9:
case 11: printf("%d月份共有月份31天\n",month);break;
case 2:
if (leap==1)
printf("%d月份共有月份29天\n",month);break;
else printf("%d月份共有月份28天\n",month);break;
}
switch (month)
{
case 3:
case 4:
case 5: printf("%d月份是春季\n",month);break;
case 6:
case 7:
case 8: printf("%d月份是夏季\n",month);break;
case 9:
case 10:
case 11: printf("%d月份是秋季\n",month);break;
case 12
case 1:
case 2: printf("%d月份是冬季\n",month);break;
}
}