Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design and write a program in C++ that will generate fortune messages to the user. You can create as many messages as you want. Your

Design and write a program in C++ that will generate fortune messages to the user. You can create as many messages as you want. Your program should use a random number generator function (like the one we did in class). The value generated will be used to determine what message will be displayed on the screen. Have a loop in your program to allow for multiple messages to be generated until the user decides to quit. Use the following flowchart to guide you in the design of your program.

Functions that you will need:

A function to print a greeting message and give the user an overview of what the program does.

A function to generate a random number in a certain range (like the one we completed in class).

A function to print the fortune message that will be picked according to a random number. Notice that the number range will depend on how many different messages you want to print. Have at least ten.

A function that prints a goodbye message to the user

Other important requirements:

When picking what message to print, use a switch statement.

Use a while or do-while structure in main to repeat until the user decides to quit.

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

9. Mohawk Industries Inc.

Answered: 1 week ago

Question

8. Satyam Computer Services Limited

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago