Question: Write the function header for each of the following functions. a) Function hypotenuse that takes two double- precision floating- point arguments, side1 and side2, and

Write the function header 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.9 ( Parking Charges) A parking garage charges a $ 2.00 minimum fee to park for up to three hours and an additional $ 0.50 per hour for each hour or part thereof over three hours. The maximum charge for any given 24- hour period is $ 10.00. Assume that no car parks for longer than 24 hours at a time. Write a program that will calculate and print the parking charges for each of three customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a tabular format, and should calculate and print the total of yesterday's receipts. The program should use the function calculateCharges to determine the charge for each customer. (calculateCharges will be made by you.)

Please keep the hours data in an array.

car hours charge

1 1.5 2.00

2 4 2.50

3 24 10.00

TOTAL 29.5 14.50

In this program -- you will have loops, arrays and functions

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!