Write a program to read in a date with year, month and day. Save it in a variable named today which is of struct date. T
Posted: Wed Apr 27, 2022 3:10 pm
Write a program to read in a date with year, month and day. Save it in a variable named today which is of struct date. Then compute another variable tomorrow which contains a date that is one day after today. Your program should include i.a struct of date struct date{ int year, month, day; ii.a sub-function that returns the date after today, and its prototype is struct date get Tomorrow(struct date today); iii.the main function that reads in the year, month and day of today, calls getTomorrow() and prints the date of tomorrow to the screen. Below are the sample runs of your program. You may assume that the user input is always legal.
х Console program output Please input a date of today (format: year/month/day): 2022/2/28 Tomorrow is: 2022/3/1 Press any key to continue... х Console program output Please input a date of today(format: year/month/day): 2022/12/31 Tomorrow is: 2023/1/1 Press any key to continue...
х Console program output Please input a date of today (format: year/month/day): 2022/2/28 Tomorrow is: 2022/3/1 Press any key to continue... х Console program output Please input a date of today(format: year/month/day): 2022/12/31 Tomorrow is: 2023/1/1 Press any key to continue...