(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for up to 10 hours of connection time. Additional hours or partial hours are charged at S1.99 each....

Solve it pls(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for up to 10<br>hours of connection time. Additional hours or partial hours are charged at S1.99 each.<br>Write a function charges that computes the total charge for a customer based on the number of hours of<br>connection time used in a month. The function should also calculate the average cost per hour of the time<br>used (rounded to the nearest 0.01), so use two output parameters to send back these results.<br>You should write a second function<br>round_money that takes a real number as an input argument and returns as the function value the number<br>rounded to two decimal places. Write a main function that takes data from an input file usage.txt and<br>produces an output file charges.txt. The data file format is as follows:<br>Line 1: current month and year as two integers<br>Other lines: customer number (a five-digit number) and number of hours used<br>Here is a sample data file and the corresponding output file:<br>Data file usage.txt<br>10 2009<br>15362 4.2<br>42768 11.1<br>In C Language<br>Without Use Arrays<br>11111 9.9<br>Output file charges.txt<br>Charges for 10/2009<br>15362 4.2 7.99 1.90<br>42768 11.1 10.18 0.92<br>11111 9.9 7.99 0.81<br>

Extracted text: (Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for up to 10 hours of connection time. Additional hours or partial hours are charged at S1.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 Here is a sample data file and the corresponding output file: Data file usage.txt 10 2009 15362 4.2 42768 11.1 In C Language Without Use Arrays 11111 9.9 Output file charges.txt Charges for 10/2009 15362 4.2 7.99 1.90 42768 11.1 10.18 0.92 11111 9.9 7.99 0.81

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here