小白求助啊!!为什么总有错误
int main(){
int a,b,c,bar;
float t=0;
scanf("%d,%d,%d",&a,&b,&c);
if(b>0&&b<=12&&c>0&&c<=31)
{
if(a%4==0) bar=1;
else bar=0;
switch(b)
{
case 12:t+=30;
case 11:t+=31;
case 10:t+=31;
case 9:t+=30;
case 8:t+=31;
case 7:t+=31;
case 6:t+=30;
case 5:t+=31;
case 4:t+=30;
case 3:t+=31;
case 2:t+=28+bar;
case 1:t+=31;
}
else printf("data error!");
}
printf("%f",t);
return 0;
}
不知道错在了哪里的我