Answered step by step
Verified Expert Solution
Question
1 Approved Answer
X MOOD15/a/NDOOOTUTODLONDE1/details Write a program that generates a random Integer N between 0 and 20 (included). Then it will ask the user continuously to enter
X MOOD15/a/NDOOOTUTODLONDE1/details Write a program that generates a random Integer N between 0 and 20 (included). Then it will ask the user continuously to enter a value V between 0 and 20. . If the Vis equal to the program displays "you win Il" and ends If the difference between Vand N is equal or greater than 12 the program displays "Very cold" If the difference between V and N is less than 12 and equal or greater than 6 the program displays "Cold" If the difference between V and N is less than 6 and equal or greater than 3 the program displays "Hot" If the difference between Vand N is less than 3 the program displays "Very hot" The program ends if the user-guess the correct number or if he enters 10 wrong numbers, If the user enters 10 wrong numbers the program displays "You lost" and the correct number Hint: To compute the difference between Vand Nuse Math.abs(V-N) Runt Epler a number between 0 and 205 Very hot Enter a number between 0 and 20: 10 Hot Emier a number between 0 and 20: 7 Very bet Enter a number betweet 0 and 20:4 Very hot Enter a number between 0 and 20: Very hot Enter a number between 0 and 20: 2 Hot Run2 Enter a number between 9 and 20:15 Very cold Enter a number between and 20.5 Hot Enter a number between 0 and 20:8 Cola Enter a number between 0 and 20:3 Very hot Enter a number between 0 and 20: 2 Very hot Enter a number between 0 and 20: 1 You win
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started