Question: Write a program called DiceRoller2.java Your program will do the following I. Ask the user how many sides his/her dice have (assume 2 dice of

 Write a program called DiceRoller2.java Your program will do the following

Write a program called DiceRoller2.java Your program will do the following I. Ask the user how many sides his/her dice have (assume 2 dice of the same # sides). Be sure to validate the input (print out Invalid input if it's not valid). What is the fewest number of sides a die can have? 2. Roll the two dice. 3. Print the values rolled on two separate lines 4. Print the sum of the two dice on a third line. Here is an example of what the user will see (italics indicate user input): How many sides on your dice? 2 Invalid input How many sides on your dice? 27 13 24 37

Step by Step Solution

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