CS21 Week5 In-Class Exercise

Write a program 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. The following is one possible sample run of the program:
tails
heads
heads
tails
tails
heads
heads
heads
It took 8 flips to get heads 3 consecutive times.

Requirements


Show me your program before you leave class today (even if it is not finished).