Last active
December 24, 2015 04:09
-
-
Save giuscri/6741962 to your computer and use it in GitHub Desktop.
Portion of a code that was broken
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// That sounds working | |
// ... | |
// ... | |
if (y1 > y2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d2,m2,y2); | |
else if (y1 == y2) { | |
if (m1 > m2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d2,m2,y2); | |
else if (m1 < m2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d1,m1,y1); | |
else { | |
if (d1 > d2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d2,m2,y2); | |
else if (d1 < d2) | |
printf("Date %2.2d/%2.2d/%2.2d is earlier.\n",d1,m1,y1); | |
else | |
printf("Dates are the same.\n"); | |
} | |
} | |
else | |
printf("Date %2d/%2d/%2d is earlier.\n",d1,m1,y1); | |
// ... | |
// ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment