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
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