#include <stdio.h>
struct date
{
int day;
int month;
int year;
};
int valueOfYear (struct date d)
{
int year;
if (d.month <= 2)
year = d.year - 1;
else
year = d.year;
return year;
}
int valueOfMonth (struct date d)
{
int month;
if (d.month <= 2)
month = d.month + 13;
else
month = d.month + 1;
return month;
}
int days (struct date d)
{
int valueOfYear (struct date d);
int valueOfMonth (struct date d);
int days;
days = (1461 * valueOfYear (d)) / 4 + (153 * valueOfMonth(d)) / 5 + d.day;
return days;
}
int main (void)
{
int N,N1,N2;
struct date value1, value2;
printf ("输入第一组日期(日 月 年):");
scanf ("%i%i%i", &value1.day, &value1.month, &value1.year);
N1 = days(value1);
printf ("输入第二组日期(日 月 年):");
scanf ("%i%i%i", &value2.day, &value2.month, &value2.year);
N2 = days(value2);
N = N2 - N1;
printf ("i%\n", N);
return 0;
}