Question: c not c++ 5.4 Write the function header (function prototype) for each of the following functions. a) Function hypotenuse that takes two double- precision floating-

c not c++c not c++ 5.4 Write the function header (function prototype) for each

5.4 Write the function header (function prototype) for each of the following functions. a) Function hypotenuse that takes two double- precision floating- point arguments, side1 and side2, and returns a double- precision floating- point result. b) Function smallest that takes three integers, x, y, z, and returns an integer. c) Function instructions that does not receive any arguments and does not return a value. [ Note: Such functions are commonly used to display instructions to a user.] d) Function intToFloat that takes an integer argument, number, and returns a floating-point result. 5.31 (Coin Tossing) Write a program that simulates coin tossing. For each toss of the coin the program should print Heads or Tails. Let the program toss the coin 100 times, 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. [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.] Use an enum for the coin (heads/tails) so you can use a switch that has heads or tails as switch cases instead on 0 and1

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!