Question: 1.Write a function that simulates tossing. a coin. The function will need to generate a random number and then decide whether to display HEADS or
1.Write a function that simulates tossing. a coin. The function will need to generate a random number and then decide whether to display "HEADS" or "TAILS". The function will return information to main to indicate heads or tails. You decide how your function should do this.
2.Write a section of code that would appear in a main function to do the following : -Ask user how many times he wants you to toss a coin. -Write a code to "toss the coin" the requested number of times. You must call the function you wrote from question 1. -At the conclusion, print out the number of times HEADS appeared, and the number of times TAILS appeared
In c++ language pls. You are only allowed to use the following functions on number question 1: #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
