Question: Programming Problem Write a C++ program named coin cpp that simulates flipping a coin repeatedly and continues until three consecutive heads are tossed. At that



Programming Problem Write a C++ program named "coin cpp" that simulates flipping a coin repeatedly and continues until three consecutive heads are tossed. At that point, your program should display the total number of coin flips that were made. Use rand0 function to simulate random toss of the coin. Here are afew example runs of the program: Sample run 1 Head Tail Tail Head Head Tail. Head Tail Head Head Head It took 11 flip to get 3 consecutive heads. Sample run 2 Tai Head Tai Tail Tai Tail Head Head Tail Head Tail Head Head Tail. Head Head Head It took 18 flips to get 3 consecutive heade
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
