Question: Create a program that accepts as user input 1 for heads, 2 for tails and any other numeric value to exit. You must use do
Create a program that accepts as user input 1 for heads, 2 for tails and any other numeric value to exit. You must use do while loop. You must use the same single variable to control your loop and also to accept the users guesses. At the end you will add up the total number of times the user guessed, the number of times the computer won and the number of times the user won. As shown in the sample output user should be allowed to exit without playing.
Hint: Math.random() method will be very useful here. You may want to use break to exit without playing.

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
