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
- Your program should use the FlipACoin function that we
discussed in class.
- Your program should use a #define constant to store the
number of consecutive heads.
- Your program should use the Randomize function to ensure
that it gets different results each time that it is executed.
Show me your program before you leave class today (even if it is
not finished).