#include <stdio.h>
int main(int argc, const char * argv[])
{
int month ,year;
printf("请输入年份:\n");
scanf("%d",&year);
printf("请输入月份:\n");
scanf("%d",&month);
if (month==1||month==3||month==5||month==7||month==8||month==10||month==12)
{
printf("%d年%d月有31天\n",year,month);
}
if (month==4||month==6||month==9||month==11)
{
printf("%d年%d月有30天\n",year,month);
}
if (month==2)
{
if (year%4==0)
{
printf("%d年%d月有29天\n",year,month);
}
else
{
printf("%d年%d月有28天\n",year,month);
}
}
return 0;
}