ITEC 120 LAB 15 Back to Lab index page

More with Sam and Sue

You will add to your lab 13 program to complete this lab.

In lab 13, Sam and Sue each flipped a coin, and you reported who won the toss.

Modify your driver to simulate 100 coin tosses - Sam and Sue will toss coins 100 times. Count how many wins Sam has, how many wins Sue has, and how many ties and print out these three numbers. Then congratulate the overall winner.

A sample run will look like this:

Out of 100 coin tosses,
Sam won 30 tosses.
Sue won 26 tosses, and
there were 44 ties.

Congratulations SAM!