Question: Write a program in C++ using Visual Studio that simulates the rolling of a single die. The program should ask the user how many times

Write a program in C++ using Visual Studio that simulates the rolling of a single die. The program should ask the user how many times to roll the die. If the user enters 0, then the program should end with a "goodbye" message. Otherwise, the program should "roll" the die the specified number of times, showing the result of each "roll". At the end of the rolls, the program should show a summary of how many 1s were rolled, how many 2s were rolled, etc. up to how many 6s were rolled. The program should then ask the user again how many times to roll the die.

Notes:

Your program will need to use six counters (one for the number of 1s, one for the number of 2s, etc.)

Use a void function to display a textualized version of a die on the screen. The function should take an int parameter representing the value of a die (1 thru 6). The function should then display a representation of the specified die. For example, if the function were called with 3 as an argument, it might display: ----- |o | | o | | o| -----

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!