3. Write a program to simulate tossing a coin that has beenweighted such that it
ID: 3611829 • Letter: 3
Question
3. Write a program to simulate tossing a coin that has beenweighted such that it lands with heads up 60 percent of the time.You should write a function imbalancedCoinFlip() that returns 1 ifa tails was flipped and a 0 if a heads was flipped. You must alsowrite a function performImbalancedFlips(int n), which takes thenumber of imbalanced coin clips to execute. This function willprint the number of heads and tails obtained to the console.Im having trouble doing this program. Thanks for all the help!
Explanation / Answer
please rate - thanks #include using namespace std; int imbalancedCoinFlip(); void performImbalancedFlips(int); int main() {int num; coutnum; performImbalancedFlips(num); system("pause"); return 0; } void performImbalancedFlips(int n) {int i,tails=0,heads=0; for(i=1;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.