Unfair Coin Flip and 6-Sided Die Roll
Like Derek Mata

Unfair Coin Flip and 6-Sided Die Roll

Unfair Coin Flip and 6-Sided Die Roll

Description:

Published: April 7, 2021 0 0 11
By: Derek Mata, Cal Poly Pomona
Category: Computer Science
Hashtags: #Coding #Programming #Statisics

Using C++, I created a program that simulates an unfair coin flip where the user inputs the probability of heads and also the amount of simulations. Then, the programs runs the simulation using a random number generator to flip the coin and then prints out the actual probability results from the simulation.


Using C++, I also created a program that simulates a 6-sided, fair die roll. The die simulates a roll for as many times as the user requests while displaying the actual probability of the simulation at the end.