Question: C++ Please Write a program that generates a random number between 1 and 10 and asks the user to guess it. It then reads the
C++ Please
Write a program that generates a random number between 1 and 10 and asks the user to guess it. It then reads the user's guess. If it's not the one generated, the program tells the user that the number is odd or even and that the guess was too low or too high. After the second try, the program tells again if it's too low or too high and that it's divisible by 3 or not. After the 3rd try, if the user still hasn't got it, the program tells what the number was. If anytime the user guesses it correctly, the program responds with "Right". Example: Guess the number generated between 1 and 10: 5 The number is even. Your guess is too low. Guess the number: 8 The number is divisible by 3 Your guess is too high. Guess the number: 6 Right
Write a program that generates a random number between 1 and 10 and asks the user to guess it. It then reads the user's guess. If it's not the one generated, the program tells the user that the number is odd or even and that the guess was too low or too high. After the second try, the program tells again if it's too low or too high and that it's divisible by 3 or not. After the 3rd try, if the user still hasn't got it, the program tells what the number was. If anytime the user guesses it correctly, the program responds with "Right". Example: Guess the number generated between 1 and 10: 5 The number is even. Your guess is too low. Guess the number: 8 The number is divisible by 3 Your guess is too high. Guess the number: 6 Right \begin{tabular}{l|l} LAB & 3.35.1: Guess the number \end{tabular} 0/10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
