InternetLite Corporation is an Internet service provider that charges customers
ID: 3657413 • Letter: I
Question
InternetLite 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 $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 cent), so use two output parameters to send back these results. Write a second function round_money that takes a real number as an input argument and returns as the 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 5Explanation / Answer
/*Becoz of browser problem my code is not in right readable format....so you may also download the code from......http://www.2shared.com/file/_uWSondt/New_folder.html*/ #include#include int charges(float hours) { float charge; float decimalPart; int avgCostPerMonth; int finalHours; decimalPart=hours-(int)hours; if(decimalPart!=0.0) { finalHours=hours+1;} if(finalHoursRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.