main()
{
struct date date1,date2;
int days,days1=0,days2=0;
int daytab[]={31,28,31,30,31,30,31,31,30,31,30,31};
int i;
//大概如此可能部分下标存在错误,自己调试修改吧
scanf("%d%d%d",&date1.year,&date1.month,&date1.day);
scanf("%d%d%d",&date2.year,&date2.month,&date2.day);
//计算从当年元月1日到的天数
for(i=0;i{ days1 += daytab[i]; } if((date1.year%4==0&date1.year%100!=0)||(date1.year%400==0) & date1.month>2) { days1++; } days1 += date1.day; // for(i=date1.year;i { days2 += 365; if((date2.year%4==0&date2.year%100!=0)||(date2.year%400==0)) { days2++; } } for(i=0;i { days2 += daytab[i]; } if((date2.year%4==0&date2.year%100!=0)||(date2.year%400==0) & date2.month>2) { days2 ++; } days2 += date1.day; days=day2-day1; printf("%d\n",days); }