Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C++ program that will prompt a user to enter a persons Name as a string. Then the program will simulate a fortune telling

Write a C++ program that will prompt a user to enter a persons Name as a string. Then the program will simulate a fortune telling machine. You should have the computer generate a random number between 1 and 20.(seed the random number generator with time beforehand). Then ouput the following statement:

Name will have xx children.

Where Name is the string that was entered by the user and xx is the random number that generated by the generator.

Repeat this within the program for a second name.

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

5. Determine how much to order

Answered: 1 week ago