subject

Write a "Guess the Number" game program where the computer selects a random number between 1 and 100. The user (e. G. Miha) then has a limited number experiments (say 7) in which he wants to guess the selected number. In each user attempt, the program should display "Your number is too small" if it is the number entered by the user is less than the selected number. Let the program display "Your number is too large" if the number entered by the user is greater than the selected number numbers. If the user guesses the selected number, then the program should display: Great, Miha! To guess my number correctly, you needed 5 experiments.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
If you arrive at the same time as another user straight across from you yield if a. they flash your headlights at you b. you can’t see their turn signals c. you’re going street and they’re running d. you’re turning they’re going straight plz
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
question
Computers and Technology, 24.06.2019 11:20
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput.find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
question
Computers and Technology, 24.06.2019 21:00
How does a vaccine prevent sickness and individual?
Answers: 2
You know the right answer?
Write a "Guess the Number" game program where the computer selects a random number between 1 and 100...
Questions
question
Mathematics, 19.10.2021 14:00
Questions on the website: 13722367