Hi I am having a problem in the sixth edition on starting out with C++ programming. I need the full code of how to do it cause I am getting errors and dont know what I am doing.
The question ask.Write a funtion named coinToss that simulates the tossing of a coin. When you call the function, it should generate a random number in the range of 1 through 2. If the random number is 1, the function should display "heads." If the random number is 2, the function should display "tails." Demonstrate the function in a program that asks the user how many times the coin should be tossed, and then simulates the tossing of the coin that number of times.
Ty for your help!!