Question: Write program that simulates the rolling of a single 6-sided die a hundred times. You can use the rand() library function as is demonstrated in

Write  program that simulates the rolling of a single 6-sided die a hundred times. You can use the rand() library function as is demonstrated in section 3.9 (feel free to look at the slides in chapter 3 to refresh your memory). 


The program should use a 100 element array to store the rolls of the die. After the program rolls the die, the program then goes through the array and tallies up the number of 1 rolls, the number of 2 rolls, the number of 3 rolls, the number of 4 rolls, the number of 5 rolls, and the number of 6 rolls. The program then displays the number of the respective rolls to the user.

Step by Step Solution

3.34 Rating (163 Votes )

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 Programming Questions!