#include
int main()
{
int sum;
int i,t,c;
int month[12]={31,28,31,30,31,30,31,31,30,31,30,31};
int year,mon,day;
printf("Please enter the times you want to calculate(eg.2):");
scanf("%d",&t);
for(c=0;c{
sum=0;
printf("\n");
printf("Please enter the date(eg.2016/06/20):");
scanf("%d/%d/%d",&year,&mon,&day);
if( (year%400==0) || ((year%4==0)&&(year%100!=0)) )
month[1]=29;
for(i=0;isum=sum+month[i];
sum=sum+day;
printf("It's the %dth day in this year.\n",sum);
}
return 0;
}