输入年月日计算具体第几天
//计算具体天数int days(int year,int month,int day)
{
int rn;
int a[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int i;
int sum=0;
if(year%4==0 && year%100!=0 || year%400==0)
rn=1;
else
rn=0;
for(i=1;i<month;i++)
if(i!=2)
sum+=a[i-1];
else if(rn==1)
sum+=29;
else
sum+=28;
sum+=day;
return sum;
}
void main()
{
printf("%d\n",days(2016,6,19));
}