为什么下面的程序错误
//问题八:输入年、月、日,在屏幕上输出此日期是该年的第几天#include<stdio.h>
int main()
{
int year,month,day,what_day;
// int a[130],b[130];
int a[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int b[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};
scanf("%d,%d,%d",year,month,day);
if(year%4==0)
{
for(;month>0;month--)
what_day+=a[month];
printf("\n%d",what_day);
}
else
{
for(;month>0;month--)
what_day+=b[month];
printf("\n%d",what_day);
}
what_day+=day;
// printf("\n第%d天",what_day);
return 0;
}