write a program that reads in two dates (using three integers for each) and disp
ID: 3653543 • Letter: W
Question
write a program that reads in two dates (using three integers for each) and displays a message showing the date that comes first. Use the followingalgorithm: if the first date's year is smaller, it comes first Otherwise, if the second date's year is smaller, it comes first Otherwise check the month to determine which date comes first in a similar way If the months are the same thencheck the day. {{VERY IMPORTANT ADD THIS: -iMPUT VALIDATION -FUNCTION (BOOL) -(Y > 0) -1 < M < 12 -1 < d <31}} PLease asnwer the soon as possibleExplanation / Answer
#include #include #include int main() { int dd1,mm1,yy1; int dd2,mm2,yy2; int fl=0; cout dd1; cout > mm1; cout > yy1; cout dd2; cout > mm2; cout > yy2; if(yy1Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.