Engineering
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.

answer
Answers: 2

Other questions on the subject: Engineering

image
Engineering, 04.07.2019 18:10, samanthabutryn
Which one from below is not one of the reasons of planning failures? (clo3) a)-planner is careless. b-planner spend less time in the field but more time on the desk c)-planner is not qualified d)-planner does not have sufficient time to properly plan
Answers: 3
image
Engineering, 04.07.2019 18:10, mirmir62
Machinery that is a key part of the process and without which the plant or process cannot function is classifed as: (clo4) a)-critical machinery b)-essential machinery c)-general purpose machinery d)-none of the specified options.
Answers: 1
image
Engineering, 04.07.2019 18:20, maciemarklin79981
A3-mm-thick panel of aluminum alloy (k 177 w/m-k, c 875 j/kg-k and ? = 2770 kg/m) is finished on both sides with an epoxy coating that must be cured at or above t,-150°c for at least 5 min. the production line for the curing operation involves two steps: (1) heating in a large oven with air at ts,0-175°c and a convection coefficient of h, 40 w/m2. k, and (2) cooling in a large chamber with air at 25°c and a con- vection coefficient of he 10 w/m2.k. the heating portion of the process is conducted over a time interval te which exceeds the ime required to reach 150°c by 5 min (h = r + 300 s). the coating has an emissivity of ? = 0.8, and the temperatures of the oven and chamber walls are 175 and 25°c, respectively. if the panel is placed in the oven at an initial temperature of 25°c and removed from the chamber at a safe-to-touch tempera ture of 37°c, what is the total elapsed time for the two-step curing operation?
Answers: 3
image
Engineering, 04.07.2019 19:10, ultimateapes
When subject to a steady load (within elastic range) over a long period of time, what is the major difference in material behavoir between steel and plastic?
Answers: 2
Do you know the correct answer?
Your task is to write a simple guessing game in C++. Your program must generate a pseudo-random numb...

Questions in other subjects:

Konu
Geography, 09.04.2020 15:33