Question: Using C++ Create a coin-flipping game. Ask the user how many times to flip the coin, and use the random function to determine heads or
Using C++

Create a coin-flipping game. Ask the user how many times to flip the coin, and use the random function to determine heads or tails each time a coin is flipped. Assume the user starts with $50. Every time the coin is flipped calculate the total (heads +$10, tails -$10). Create another function to test if the user has gone broke yet (THIS FUNCTION MUST RETURN A BOOLEAN TRUE/FALSE VALUE). End the program when the user is broke or when the coin was flipped the number of times the user had specified. Display: 1) how many times the coin was flipped, 2) the number of times "heads" was the result, 3) the number of times "tails" was the result, and 4) how much money the user has at the end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
