subject

Write a Java program that generates a random number between 0 and 50. Then, the program prompts for guesses until the user is correct, or has made 10 wrong guesses. After each guess, the program indicates whether the guess was too high, too low, or correct. Once the round has ended, either by a correct guess or by using up the 10 guesses, the program displays the current status. Enter an integer number ( 0 to exit): 3241 3241 has 4 digits. Sum of digits of 3241 is 10. Enter an integer number ( 0 to exit): 264 264 has 3 digits. Sum of digits of 264 is 12. Enter an integer number ( 0 to exit): -12 -12 has 2 digits. Sum of digits of -12 is -3. Enter an integer number ( 0 to exit): 0 End. Enter a positive integer between 0 and 9: -3 Invalid input number. Enter a positive integer between 0 and 9: 15 Invalid input number. Enter a positive integer between 0 and 9: 5 0 !

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
If i wanted to include a built-in calendar in a document, what option could i select? draw table insert table insert chart quick tables
Answers: 1
You know the right answer?
Write a Java program that generates a random number between 0 and 50. Then, the program prompts for...
Questions
question
Mathematics, 01.02.2021 16:50
question
Biology, 01.02.2021 16:50
Questions on the website: 13722367