+1 vote
51 views

Write enumerated types that supports dates—such as december 12. Then add a function that produces a next day. So nextday(date) of december 12 is december 13. Also write a function printdate(date) that prints a date legibly.The function can assume that February has 28 days and it most know how many days are in each month. Use a struct with two members; one is the month and the second is the day of the month—an int (or short).

typedef enum month{ jan, feb, …} month; typedef struct date{ month m; int d} date;

Then print out the date January 1 and print the next day Jan 2.

Do this for the following dates: February 28, March 14, October 31, and December 31.

by (545 points)   | 51 views
We shall answer your question soon.
( Delay is expected due some local site business works so, plz bear with us. )

Thanks for being active on our community site.

Please log in or register to answer this question.

Related questions

+1 vote
1 answer
asked Jun 27 by fatyma Nauman (545 points) | 38 views
+3 votes
0 answers
+2 votes
0 answers
asked Jun 12 by toheed (1.3k points) | 14 views
+2 votes
2 answers
asked Jun 4 by toheed (1.3k points) | 85 views
+2 votes
1 answer
asked Jun 11 by noor (1.1k points) | 20 views
+2 votes
1 answer
+3 votes
1 answer




Welcome to Meansflow - Where Developers and Students Learn, Share, & Build Careers, where you can ask questions and receive answers from other members of the community.
117 questions
87 answers
40 comments
105 users