Question: C++ Write a program that simulates flipping a coin and counts how many times it was heads and how many times it was tails. The
C++
Write a program that simulates flipping a coin and counts how many times it was heads and how many times it was tails. The program will ask the user for the seed value (THIS IS DONE FOR YOU, this would be taken out, but is needed for testing) and also it will ask the user how many times they want to flip a coin. It then prints how many heads and how many tails there were. Your program should have the following function: headsOr Tails - when this function is called, it returns "heads" "tails" (you will need to use a random number) Define the function below main and put the prototype before main Sample Output Enter the seed value: 3 How many times do you want to flip a coin: 4 After flipping a coin 4 times there were: Heads: 3 Tails: 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
