Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use C++ Write a program that will prompt the user to input the following: Example 2. For larger data sets, the user entered 5 dice

Use C++

image text in transcribed

image text in transcribed

Write a program that will prompt the user to input the following: Example 2. For larger data sets, the user entered 5 dice and rolled them 500 times. The graph should look like the output shown below. 1. The number of dice to be rolled. 2. How many times the dice should be rolled? Since the values above will vary, you must use pointer arrays and dynamically allocate memory. Example 1. The user entered 3 dice and rolled them twice. 1* Roll: Total of Faces: 12 5: 6: 7: 8: 9: 10: 11: # 12: 13: 14: 15: 16: 17: %%%%%% - %%%%%%%%%%%% 2nd Roll: Total of Faces: 8 %%%%% The program will store the total of faces per roll and the values will be later used to plot a graph. The graph should look like the output shown below. 18: 19: 20: 21: 3: 4: 22: 23: %%%%% 5: 6: : 8: 24; 25: 26: 27: 9: 10: 11: 28: 29: 30: 12: 13: 14: 15: 16: 17: The asterisk (*) tallies the number of times that total has occurred. 5 and 30 are the minimum and maximum totals, respectively, for rolling 5 dice. 18: The asterisk (*) tallies the number of times that total has occurred. 3 and 18 are the minimum and maximum totals, respectively, for rolling 3 dice. The declaration and implementation sections of the class have been defined for you. Use it to complete your program. #include #include #include

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_2

Step: 3

blur-text-image_3

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

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

5. How do instructional objectives help learning to occur?

Answered: 1 week ago

Question

4. Help trainees set challenging mastery or learning goals.

Answered: 1 week ago