求助(急)
main(){
struct date
{int year;
int month;
int day;};
int i,days=0;
int a[13]={0,0,31,28,31,30,31,30,31,31,30,31,30};
printf("Input year month day:\n");
scanf("%d,%d,%d",&date.year,&date.month,&date.day);
for(i=1;i<=date.month;i++)
days=days+a[i];
days=date.day+days;
if((date.year%4==0&&date.year%100!=0||date.year%400==0)&&date.month>2)
days=days+1;
printf("%d",days);
}
编译时,系统说没有定义date,为什么,结构体是怎么定义的请各位大侠指点