Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(find_future_dates.cpp) Write a C++ program that prompts the user to enter an integer (from 0 to 6) for today's day of the week (Sunday is
(find_future_dates.cpp) Write a C++ program that prompts the user to enter an integer (from 0 to 6) for today's day of the week (Sunday is 0, Monday is 1,..., and Saturday is 6) and another integer (any positive integer) for the number of days after today to show a future day. a. Use variables to store current day and future day. b. Use switch to find out what day of the week is today. c. Use if-else if-else to find out what day of the week is the future day. d. Check that the first input is between 0 and 6 inclusively, and the second input is positive. If they are invalid, the program terminates and prints error messages. See below for the error messages. Here are the sample runs: Enter today's day: 1 Enter the number of days elapsed since today: 10 Today is Monday and the future day is Thursday Enter today's day: 10 Enter the number of days elapsed since today:10 Invalid today's day, it should be between 0-6 inclusively Enter today's day: 1 Enter the number of days elapsed since today: -1 Invalid number of days elapsed, it must be positive
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started