hours of connection time. Additional hours or partial hours are charged at $1.99 each. Write a function charges that computes the total charge for a customer based on the number of hours of connection...

hours of connection time. Additional hours or partial hours are charged at $1.99 each. Write a function charges that computes the total charge for a customer based on the number of hours of connection time used in a month. The function should also calculate the average cost per hour of the time used (rounded to the nearest 0.01), so use two output parameters to send back these results. You should write a second function round_money that takes a real number as an input argument and returns as the function value the number rounded to two decimal places. Write a main function that takes data from an input file usage.txt and produces an output file charges.txt. The data file format is as follows: Line 1: current month and year as two integers Other lines: customer number (a five-digit number) and number of hours used
Nov 20, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here