int mm, dd, yy, mm1, dd1, yy1;
printf("Enter first date (mm/dd/yy): ");
scanf("%d /%d /%d", &mm1, &dd1, &yy1);
printf("Enter second date (mm/dd/yy): ");
scanf("%d /%d /%d", &mm, &dd, &yy);
if(yy1 < yy)
printf("%d/%d/%d is earlier than %d/%d/%d", mm1, dd1, yy1, mm, dd, yy);
else if(yy < yy1)
printf("%d/%d/%d is earlier than %d/%d/%d", mm, dd, yy, mm1, dd1, yy1);
else if(mm1 < mm)
printf("%d/%d/%d is earlier than %d/%d/%d", mm1, dd1, yy1, mm, dd, yy);
else if(mm < mm1)
printf("%d/%d/%d is earlier than %d/%d/%d", mm, dd, yy, mm1, dd1, yy1);
else if(dd1 < dd)
printf("%d/%d/%d is earlier than %d/%d/%d", mm1, dd1, yy1, mm, dd, yy);
else if(dd < dd1)
printf("%d/%d/%d is earlier than %d/%d/%d", mm, dd, yy, mm1, dd1, yy1);
else
printf("same");