#include <stdio.h>
int main()
{
int i,j;
printf("输入年份:");
scanf("%d",&i);
printf("输入月份:");
scanf("%d",&j);
switch (j)
{
case 2:
if((i%4==0)&&((i%100!=0)||(i%400==0)))
{
printf("闰年:%d ",i);
printf("%d月有29天",j);
printf("\n");
}
else
{
printf("平年:%d",i);
printf("%d月有28天",j);
printf("\n");
}
break;
case 4:
case 6:
case 9:
case 11:
printf("平年:%d",i);
printf("\n");
printf("%d月有30天",j);
printf("\n");
default:
printf("平年:%d",i);
printf("\n");
printf("%d月有31天",j);
printf("\n");
break;
}
return 0;
}