Write a C++ program that simulates coin tossing.

Write a C++ program that simulates coin tossing. For each toss of the coin the program should print Heads or Tails. The program should toss a coin 100 times. Count the number of times each side of the coin appears and print the results at the end of the 100 tosses.

The program should have the following functions as a minimum:

  • void toss() – called from main() and will randomly toss the coin and set a variable equal to the face of the coin
  • void count() – called from toss to increment counter for heads or tails
  • void displayCount() – is called from main() and will display the values of the counter for heads and the counter for tails.

If any global variables are used in the program, the program will receive a grade of 0.

So far what I have. Anything I should clean up? Also, I am confused on the global variables part specifically. Can you doublecheck to make sure I am not using any in the program. Any help is appreciated!! #include #include #include using namespace std; int totalCount=100; int headsCount=0; int currentCoinFace; void count() {    if(currentCoinFace==0)    {        headsCount++;        cout<><   =”” }=””   =”” else=””   =”” {=””   =””    =””><><   =”” }=”” }=”” void=”” toss()=”” {=””   =”” currentcoinface=”rand()” %=”” 2;  =””   =”” count();=”” }=”” void=””>
{    cout

 

 

total=”” number=”” of=”” heads=”<    cout<<” the=”” total=”” number=”” of=”” heads=””>

find the cost of your paper

Compute the phi-coefficient to measure the strength of the relationship.

test 3 AA   Multiple Choice Identify the choice that best completes the statement or answers the question.   ____    1.   For an ANOVA comparing three treatment conditions, what is….

What may shift aggregate supply to the right?

discussion 1: Economic growth may be attained when either aggregate demand or aggregate supply shifts to the right. Prior to beginning work on this discussion, read Chapter 15 from the….

. Present your article as a 2-page report in a Word document formatted in APA style.

Use your textbook and the  University online library to find one recent success and one recent failure in international marketing. Write an article on what makes for success in international….