```#include<stdio.h>

//sum
void CountTime(int day, int month, int year)
{
int Dayth;
printf("%d/%d/%d is: ", day, month, year);

for(int i = 1; i < month;i++)
{
if( i == 1 || i == 3 || i == 5 || i == 7 || i ==  9 || i == 11)
{
if(month == 1)
{
Dayth = 0;
}
else
{
Dayth =  Dayth + 31;
}

}
else if(i == 4 || i == 6 ||i == 8 || i == 10 || i == 12)
{
Dayth =  Dayth + 30;
}
else
{
Dayth =  Dayth + 28;
}
}

printf("[%d]th day in year", Dayth + day);

}

void main()
{
int day, month, year;

//check input data
do
{
do
{
printf("enter day: ");
scanf("%d", &day);
if(day > 31 || day <= 0)
{
printf(">>ERROR! day <= 30\n");
}
}while(day > 31 || day <= 0);

do
{
printf("enter month: ");
scanf("%d", &month);
if(month > 12 || month < 1)
{
printf(">>ERROR! month >= 12\n");
}
}while(month > 12 || month < 1);

if(month == 2 && day > 28 || month == 4 && day > 30 ||
month == 6 && day > 30 || month == 8 && day > 30 ||
month == 10 && day > 30 || month == 12 && day > 30)
{
printf(">>ERROR! day of month\n");
printf("month [2] : 28 day\n");
printf("month [4] [6] [8] [10] [12] : 30 day\n");
printf("month [1] [3] [5] [7] [9] [11] : 31 day\n\n");
}

}while(month == 2 && day > 28 || month == 4 && day > 30 ||
month == 6 && day > 30 || month == 8 && day > 30 ||
month == 10 && day > 30 || month == 12 && day > 30);

do
{
printf("enter year: ");
scanf("%d", &year);
if(year < 2000)
{
printf(">>ERROR! year >= 2000");
}
}while(year < 2000);

CountTime(day, month, year);
}
```