The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science
CSci 51 -- Spring 1999
Lab Exercise #8
For labs meeting March 4-5, 1999

Write a program using Program 7.6 (Random_Numbers) as a starting point that

  • instantiates the generic random number generator for an enumeration type that has values Heads and Tails.
  • runs ten trials of a series of 200 calls to this random number generator
  • for each of the ten trials:
    • display the values in a table, 10 to a line
    • keep track of, and display, the number of heads and number of tails

Do you get about the same number of heads as tails in each trial?