subject

Using c++ write a program that simulates flipping a coin repeatedly and continues until three consecutive heads
are flipped. at that point, your program should display the total number of coin flips that were made
and the average number of heads flipped.
#1 – write a function string getname() to read in the user’s name from the keyboard
#2 – write a function char getgender() to read in the user’s gender from the keyboard
#3 – write a function bool flipcoin() to flip the coin and return true for heads and false for tails
(refer to blackboard for random number generation details)
#4 – write a function float calcaverageheads(int hcnt, int tcnt) to calculate the
average of heads vs. total flips

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 15:40, elgallo5399
In the above figure, what type of cylinder arrangement is shown in the figure above? a. l-type b. v-type c. in-line d. horizontal pls make sure its right if its rong im grounded for 3months
Answers: 1
image
Computers and Technology, 24.06.2019 22:10, mikaylaaaaa
How many different ways are there to order the eight jobs in the queue so that job usu comes somewhere before cdp in the queue (although not necessarily immediately before) and cdp comes somewhere before bbd (again, not necessarily immediately before)?
Answers: 1
image
Computers and Technology, 25.06.2019 00:00, tori3981
When pasting an existing chart into a word document, you can choose to using the paste options button. a. paste the chart as a picture b. embed the chart c. add the chart while keeping the destination formatting intact d. insert the chart while keeping the source formatting intact
Answers: 1
image
Computers and Technology, 25.06.2019 08:10, AgarioEdit
Is a philosophy and a software and system development methodology that focuses on the development, use, and reuse of small, self-contained blocks of codes to meet the software needs of an organization. joint application designextreme programmingrapid application developmentservice-oriented architecture
Answers: 1
You know the right answer?
Using c++ write a program that simulates flipping a coin repeatedly and continues until three consec...

Questions in other subjects: