#include
#include
void main()
{
int day1,mon1,year1,day2,mon2,year2;
int ref,dd1,dd2,i;
clrscr();
printf("\nEnter first day, month, year");
scanf("%d%d%d",&day1,&mon1,&year1);
printf("\nEnter second day,month,year");
scanf("%d%d%d",&day2,&mon2,&year2);
ref = year1;
if(year2
Sample Output :
Enter first day, month, year29 7 2009
Enter second day,month,year12 12 2009
No. of days of first date fronm the Jan 1 2009= 210
No. of days from the reference year's first Jan = 346
Therefore, diff between the two dates is 136
|