Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

(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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

Describe the Indian constitution and political system.

Answered: 1 week ago

Question

Explain in detail the developing and developed economy of India

Answered: 1 week ago

Question

Problem: Evaluate the integral: I = X 52+7 - 1)(x+2) dx

Answered: 1 week ago

Question

What is gravity?

Answered: 1 week ago

Question

What is the Big Bang Theory?

Answered: 1 week ago

Question

6. What data will she need?

Answered: 1 week ago

Question

1. How did you go about making your selection?

Answered: 1 week ago