Question: write a program that generated two random integers using the method Math.random ( ) , each between 1 and 9 ( inclusive ) . Your

write a program that generated two "random" integers using the method Math.random(), each between 1 and 9(inclusive). Your program should output the two numbers, and one of the following messages
draw if the difference between the two integers is 0
loss if the difference between the integers is odd
win if the difference is even

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