All parts complete TYPED and complete all requirements to get 100% feedback. Declare a struct called myDate
Fantastic news! We've Found the answer you've been seeking!
Question:
All parts completeTYPEDand complete all requirements to get100% feedback.
Declare a struct called myDate that can store dates. Let the struct have three members: date (of type integer), month (of type integer) and year (of type integer).
Also, consider that we have declared two variables of type myDate as:
myDate d1;
myDate d2;
// initialize d1, d2
if (d1 == d2)
cout
else cout
(a) Show the code that declares the myDate struct.
(b) See that in the code snippet above, we declare d1 and d2 as variables of type myDate . Show the code to initialize d1 to Jan 5, 2021 and to initialize d2 to Oct 20, 2020.
(c) Show the code that needs to be added so that the comparison (d1 == d2) works. Also specify where this code will be added.
Posted Date: