Question: java code that rolls 5 dice 4 times. if the dice rolled gets a '5' '4' '3' in order then score should be 5+4+3 +the
java code that rolls 5 dice 4 times.
if the dice rolled gets a '5' '4' '3' in order then score should be 5+4+3 +the 2 other numbers
so if dice is 5,4,3,6,1 the score should be 19
if the dice rolled is 6,5,2,3,1 the score is 0
output should look like:
Roll: 6,5,5,2,1
Score: 0
Roll: 4,1,3,9,3
Score: 0
Roll: 5,4,3,1,2
Score: 15
Roll: 6,2,1,4,1
Score: 15
note: the output should have randomly rolled numbers.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
