Question: Write a C++ program that satisfies the following requirements: It prompts the user to enter the following information, then recommends the best activity for today's

Write a C++ program that satisfies the following requirements:

It prompts the user to enter the following information, then recommends the best activity for today's conditions.

- user's name,

- today's weather [S, R, W]

- today's day [0 - 6]

Based on the user's inputs, one of the following activities is recommended:

1. Sunny and weekday (M-F): play tennis

2. Sunny and weekend (Sat, Sun); go hiking

3. Rainy and weekday (M-F): stay home

4. Rainy and weekend (Sat, Sun); go bowling

5. Windy and weekday (M-F): kiting

6. Windy and weekend (Sat, Sun); hang-gliding

NOTE1: Assume a perfect AI user - entering 'S' for sunny, 'R' for rainy, and 'W' for windy weather. No user input error checking or validation is needed.

NOTE2: Assuming a perfect AI user - entering [0..6] for days where 0 is for Sunday, 1 for Monday, ..., 6 for Saturday. No user input error checking or validation is needed.

* I know this program is simple, but I don't know how to use conditional statements with C++ yet.

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!