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

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:20
Avariable of the data type arrays is storing 10 quantities. what is true about these quantities? a. the quantities all have different characteristics. b. the quantities all have the same characteristics. c. five quantities have the same and five have different characteristics. d. it is necessary for all quantities to be integers. e. it is necessary for all quantities to be characters.
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 24.06.2019 16:30
Jenny needs to record the names of 30 students, write down the subjects they studied, and note their grades in each subject after the midsemester exams and the end-of-semester exams. she divides the midsemester and end-of-semester information into two separate worksheets, sheet 1 and sheet 2. how will she rename the two worksheets?
Answers: 2
question
Computers and Technology, 25.06.2019 06:30
How are slides deleted from a presentation?
Answers: 1
You know the right answer?
Using c++ write a program that simulates flipping a coin repeatedly and continues until three consec...
Questions
question
English, 20.01.2021 07:40
question
Mathematics, 20.01.2021 07:40
question
Mathematics, 20.01.2021 07:40
question
English, 20.01.2021 07:40
question
English, 20.01.2021 07:40
question
Mathematics, 20.01.2021 07:40
question
Geography, 20.01.2021 07:40
Questions on the website: 13722367