Page 3 - Introduction to Computer Science
P. 3
Extended Challenge:
If there is a tie for which number was rolled the most, print all of the numbers. Also indicate that there was a tie.
Hint: an array might help solve this quickly.
Example:
Please enter in how many dice to roll: 10 Die roll = 5
Die roll = 1
Die roll = 3
Die roll = 2
Die roll = 3
Die roll = 6
Die roll = 5
Die roll = 4
Die roll = 5
Die roll = 3
There was a tie
The die that was rolled the most was 3 and it rolled 3 times The die that was rolled the most was 5 and it rolled 3 times