← Back

Code Challenge 15 - Coin Flip Simulator


Introduction

This program simulates flipping a coin many times and seeing how many flips result in heads or tails.

Skills to Practice

Challenge Tasks

  1. Create a console project named CodeChallenge15CoinFlipSimulator.
  2. Prompt the user for the number of flips to be performed.
  3. For each flip:
    1. Randomly generate ‘heads’ or ‘tails’.
    2. Track the number of heads and tails results.
  4. After all the flips are finished, output the number of heads and tails results, as well as the percentages.

Sample Output