#include<iostream.h>
 struct date 
{
	int year;
	int month;
	int day;
};
 int main()
{
 date d;
 int i,sum;
 int mon[12]={31,28,31,30,31,30,31,31,30,31,30,31};
 cout<<"请输入年,月,日:"<<endl;
 cin>>d.year>>d.month>>d.day;
 for(i=0,sum=0;i<d.month-1;i++)
  sum+=mon[i];
 sum+=d.day;
 if(d.year%4==0&&d.year%100!=0||d.year%400==0)
  if(d.month>2)
   sum++;
 cout<<d.month<<"月"<<d.day<<"日是"<<d.year<<"年的第"<<sum<<"天"<<endl;
 return(0);
}

