Question: for Write a program to play Jan-Ken-Po with the user. Prompt the user to enter R for rock, P paper or S for scissors. The

 for Write a program to play Jan-Ken-Po with the user. Prompt

for Write a program to play Jan-Ken-Po with the user. Prompt the user to enter R for rock, P paper or S for scissors. The computer's choice can be randomly generated by the following statement: compChoice = (int) (Math.random() * 3); After the statement runs, the variable compChoice will store 0, 1 or 2 representing rock, paper and scissors respectively. Display the choice of the computer and the result of the play of the game

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!