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 19:40
Solve the following javafx application: write a javafx application that analyzes a word. the user would type the word in a text field, and the application provides three buttons for the following: - one button, when clicked, displays the length of the word.- another button, when clicked, displays the number of vowels in the word.- another button, when clicked, displays the number of uppercase letters in the word(use the gridpane or hbox and vbox to organize the gui controls).
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
What is html ? give a small description about html
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. andy received a potentially infected email that was advertising products. andy is at risk of which type of security threat? a. spoofing b. sniffing c. spamming d. phishing e. typo-squatting
Answers: 2
You know the right answer?
Using c++ write a program that simulates flipping a coin repeatedly and continues until three consec...
Questions
question
Mathematics, 23.03.2021 06:10
Questions on the website: 13722363