Question: I NEED HELP RIGHT AWAY Write a C++ program to simulate rolling a six-sided fair die. Allow the user to enter the number of rolls.

I NEED HELP RIGHT AWAY

Write a C++ program to simulate rolling a six-sided fair die. Allow the user to enter the number of rolls.

Your program should use rand() to get the result of die rolling.

Compute the number of occurrences for each number roll.

Calculate the percentage for each number roll.

Out put the results in the following format.

Use a do while loop to allow the user to repeat the process.

Here is the sample run for your program:

Please enter the number of die rolls

25

Number Frequency Percentage

1 3 0.12

2 6 0.24

3 10 0.40

4 1 0.04

5 3 0.12

6 2 0.08

Do you want to continue rolling die another time? Press Y or N

Y

Please enter the number of die rolls

100

---end of program---

NOTE: Without using array

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!