Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (ajprincess):

Pls help:) Write a program called NumberGuess to play the number guessing game. The program shall generate a random number between 0 and 99. The player inputs his/her guess, and the program shall response with "Try higher", "Try lower" or "You got it in n trials" accordingly. For example: > java NumberGuess Key in your guess: 50 Try higher 70 Try lower 65 Try lower " You got it in 4 trials! Hints: Use Math.random() to produce a random number in double between 0.0 and (less than) 1.0. To produce an int between 0 and 99, use: int secretNumber = (int)(Math.random()*100);

OpenStudy (ajprincess):

@ganeshie8 @inkyvoyd

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!