Question: Above is the problem that I have. Below is the code I've already done but I'm stuck. #include using namespace std; enum months { Tes,

 Above is the problem that I have. Below is the code

Above is the problem that I have. Below is the code I've already done but I'm stuck.

#include

using namespace std;

enum months { Tes, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec };

struct time { int days; int years; months m; //formating needs to be done };

int main() {

struct time d;

int temp = 0;

cout > temp;

cout

cin >> d.days; cout

cin >> d.years;

if (temp == 1) { d.m = Jan; }

if (temp == 2) { d.m = Feb; }

if (temp == 3) { d.m = Mar; }

if (temp == 4) { d.m = Apr; }

if (temp == 5) { d.m = May; }

if (temp == 6) { d.m = Jun; }

if (temp == 7) { d.m = Jul; }

if (temp == 8) { d.m = Aug; }

if (temp == 9) { d.m = Sep; }

if (temp == 10) { d.m = Oct; }

if (temp == 11) { d.m = Nov; }

if (temp == 12) { d.m = Dec; }

if (d.days >= 32) {

cout

} }

You'll be taking input from the user for a day, month, and year. The month will be in an enum while the day and year will be integers. You'll need to create a struct that houses the 3 datas and a function that can validate if it is a real date using the struct type you create as a parameter. You'll need another function to print out the date into a nice format (can be any, just make it pretty) that also uses the struct type you created as a parameter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!