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 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
Get step-by-step solutions from verified subject matter experts
