Question: C++ language 1. Create a Magic 8-Ball program. Ask the user to first think of a yes/no question and then press any key to continue.

C++ language

1. Create a Magic 8-Ball program. Ask the user to first think of a yes/no question and then press any key to continue. Once they press a key, generate a random number between 0-6 (inclusive), and use a switch statement to print out one of the following statements. Feel free to use an enum to make your program read easier.

Absolutely NOT! No I dont think so Hmmm maybe? I believe so Yes Hell YES! Example Output Think of a yes/no question. Press any key to continue... Absolutely NOT!

2. Create a program to simulate level difficulty. Each level of difficulty of your game will have a different number of enemies, though that number is random. Ask the user which level of difficulty they would like to play. Use a switch to process their choice. Generate a random number of enemies for your game, but generate a number in a higher range for harder levels of gameplay.

Example Output

Difficulty Levels 1) Easy 2) Medium 3) Hard Whatll it be? 1 Youll have to fight 6 enemies! Difficulty Levels 1) Easy 2) Medium 3) Hard Whatll it be? 3 Youll have to fight 27 enemies!

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!