Page 2 - Introduction to Computer Science
P. 2

 Lab 13
The user will input a number X. Roll a die (random 1-6) X number of times (print out the results). Determine which number occurred the most, and how many times it occurred.
Note: Using the Math.max( a , b ) method might help you solve this Math.max( a , Math.max( b , c ) )
Example:
Please enter in how many dice to roll: 7 Die roll = 5
Die roll = 1
Die roll = 3
Die roll = 2 Die roll = 3 Die roll = 6 Die roll = 3
The die that was rolled the most was 3 and it rolled 3 times
       

























































































   1   2   3   4   5