Homework 6 - Homework 6.34 / * / File: coinflip.cpp / /...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 6.34 // *********************************************************************** // File: coinflip.cpp // // Coin Flip Sim - This program simulates flipping a coin one hundred times // by randomly determining whehter the flip was heads or tails, // and keeps track of each flip, displaying the results. // // Author: Benjamin Jones // Created: 17 February 2008 // Updated: Original // // Assignment: 4.27 // Compiler: MinGW32 G++ 3.4.2 (GNU) // // Inputs: None // Constraints: None // Outputs: Displays results of coin flip in the following format: // <heads or tails> // . // . // . // Heads: <heads> Tails: <tails> // ********************************************************************* // // Modules: // // 1. Randomly determine the results of one hundred coin flips // // 2. Display results to user
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
// //*********************************************************************** // // Design: // // 1.a Initialize the seed for the random function // 1.b While the number of flips is less than one hundred begin loop
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 6

Homework 6 - Homework 6.34 / * / File: coinflip.cpp / /...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online