Write a C++ program that simulates coin tossing. For each toss of the coin the program should printHeads orTails. 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:
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<><>{ cout
total="" number="" of="" heads="<><">">
>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here