Question: Language- C This assignment is to create the Coin Tossing application. Write a program that simulates coin tossing. You will need to use current time

Language- C

Language- C This assignment is to create the Coin Tossing application. Write

This assignment is to create the Coin Tossing application. Write a program that simulates coin tossing. You will need to use current time for generating randomized random number. For each toss of the coin the program should print Heads or Tails Let the program toss the coin 100 times (use a for loop in here), and count the number of times each side of the coin appears. Print the results The program should call a separate function flip that takes no arguments and returns 0 for tails and 1 for heads. You will need to create this function flip and call it in the main function. [Note: If the program realistically simulates the coin tossing, then each side of the coin should appear approximately half the time for a total of approximately 50 heads and 50 tails.] The sample of output: Microsoft Visual Studio Debug Console ails Tails Heads HeadsTailsTails HeadsTails HeadsTails ails Heads Heads Heads Tails Tails Heads Heads Heads Heads ails TailsHeads TailsTails Heads Heads Tails TailsTails ails Heads Heads Heads Tails Heads Heads Ta ailsTails Heads Heads HeadsHeads Tails Tails Heads Tails eads Tails Tails Tails Heads Tails HeadsTails Tails Heads eads HeadsHeads Tails Heads HeadsTails Tails Heads Heads eads Tails Heads Tails Tails Tails Heads Heads Heads Tails eads Tails Heads Heads Heads Tails Heads Heads Heads Tails eads Hea ils Tails Heads ds Tails Heads Heads Tails Tails Heads Heads Heads he total number of Heads was 55 he total number of Tails was 45

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!