请教一下,这个关于switch的语句~
要求输入年份和月份 得出本月天数#include<stdio.h>
void main()
{
int year,month;
printf("input year and month:");
scanf("%d%d",&year,&month);
if(month==2)
{
if((year%4==0&&year%100!==0)||(year%400==0))
printf("the days of %d of %d is 29",year,month");
else printf("the days of %d of %d is 28",year,month");
}
switch(month)
{
case 1:
case 3:
case 5:
case 7:
case 8:
case 10:
case 12:prtinf("the days of %d of %d is 31",year,month);break;
case 4:
case 6:
case 8:
case 11:prtinf("the days of %d of %d is 30",year,month);break;
default:printf("error input!\n");
}
}
10 errors,1 warning
不太清楚错在哪里了 请指教qaq