不加printf则无输出
第6行应该是scanf("%d %d",&year,&month);前几行修改一下就可以了。修改如下:
int year,month; scanf("%d %d",&year,&month); printf("%d.%d has",year,month);
类似:printf("%d %d has 28 days\n",year,month);