Question: Write a program to simulate tossing a coin that has been weightedsuch that it lands with heads up 60 percent of the time. You shouldwrite
Write a program to simulate tossing a coin that has been weightedsuch that it lands with heads up 60 percent of the time. You shouldwrite a functionimbalancedCoinFlip() that returns 1 if a tails wasflipped and a 0 if a heads was flipped. You must also write afunction performImbalancedFlips(int n), which takesthe number ofimbalanced coin clips to execute. This function will print thenumber of heads and tails obtained to the console.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
