Write program that simulates the rolling of a single 6-sided die a hundred times. You can use
Fantastic news! We've Found the answer you've been seeking!
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 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.
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: