subject
Engineering, 31.03.2020 00:03 bevanscory123

Your task is to write a simple guessing game in C++. Your program must generate a pseudo-random number between 1 and 100, inclusive. The user will then be presented with opportunities to guess the number. After each guess, the program must indicate whether the guess was too high, too low, or correct. To make the game more interesting, the user will bet on each number. Initially, the program will give the user $1000. Each round, prompt the user for a bet. Then prompt for guesses until the user is correct, or has made 6 wrong guesses. The payoff is calculated as follows: 1. If the player guesses correctly within the first 6 guesses, the player wins bet / # guesses. So if the player bet $100 and correctly guessed on the 4th try, the payoff is $25. 2. If the player does not guess correctly within the first 6 guesses, the player loses the amount bet. Once the round has ended (either by a correct guess or by using up the 6 guesses), the program must display the current status (see the sample execution output below for the minimum required information) and prompt the user to see if he/she wants to play again. This will continue until the user indicates that they do not want to play again or until the player runs out of money.

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Compute the pressure drop of 30°c air flowing with a mean velocity of 8 m/s in a circular sheet-metal duct 300 mm in diameter and 15 m long. use a friction factor, f 0.02, and pair = 1.1644 kg/m a. 37.26 pa b. 25.27 pa n c. 29.34 pa d. 30.52 pa
Answers: 1
question
Engineering, 04.07.2019 18:10
Journeyman training is usually related (clo2) a)-to specific tasks b)-to cost analysis of maintenance task c)-to control process to ensure quality d)-to installation of machinery
Answers: 2
question
Engineering, 04.07.2019 18:20
Modern high speed trains do not have perpendicular expansion gaps where rails are joined end-to-end any more they are mostly welded together but what might happen if there was a spell of particularly hot weather that causes inspection of the tracks?
Answers: 1
question
Engineering, 04.07.2019 18:20
A2-m rigid tank initially contains saturated water vapor at 100 kpa. the tank is connected to a supply line through a valve. steam is flowing in the supply line at 600 kpa and 300 c. the valve is opened, and steam is allowed to enter the tank until the pressure in the tank reaches the line pressure, at which point the valve is closed. a thermometer placed in the tank indicates that the temperature at the final state is 200°c. determine (a) the mass of steam that has entered the tank (b) the amount of heat transfer.
Answers: 3
You know the right answer?
Your task is to write a simple guessing game in C++. Your program must generate a pseudo-random numb...
Questions
question
Mathematics, 10.12.2019 05:31
question
Mathematics, 10.12.2019 05:31
question
Mathematics, 10.12.2019 05:31
question
Mathematics, 10.12.2019 05:31
Questions on the website: 13722359