subject
English, 28.04.2021 04:00 edog32

(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 $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
Here is a sample data file and the corresponding output file:
Data file usage. txt
10 2009
15362 4.2
42768 11.1
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

ansver
Answers: 2

Another question on English

question
English, 21.06.2019 22:00
Read this excerpt from leah missbach day's foreword to wheels of change.as wbr's resident photographer i am privileged to see firsthand the impact bicycles have on the lives of our recipients.why does the author include this excerpt?
Answers: 3
question
English, 22.06.2019 03:30
Which word best describes the mood in this sentence? lucia was aglow as she bounced into the room with stories about her summer vacation.
Answers: 1
question
English, 22.06.2019 04:00
He leaned his head against the wall; his eyes were shut, his hands clasped in each other, and his body seemed to be sustained in an upright position merely by the cellar-door against which he rested his left shoulder. the lethargy into which he was sunk seemed scarcely interrupted by my feeling his hand and his forehead. his throbbing temples and burning skin indicated a fever . . there was only one circumstance that hindered me from forming an immediate determination in what manner this person should be treated. my family consisted of my wife and a young child. our servant-maid had been seized, three days before, by the reigning malady, and, at her own request, had been conveyed to the hospital. we ourselves enjoyed good health, and were hopeful of escaping with our lives. our measures for this end had been cautiously taken and carefully adhered to. they did not consist in avoiding the receptacles of infection, for my office required me to go daily into the midst of them; nor in filling the house with the exhalations of gunpowder, vinegar, or tar. they consisted in cleanliness, reasonable exercise, and wholesome diet. who is the story’s first-person narrator
Answers: 1
question
English, 22.06.2019 08:00
Which. sentence from homesick best shows that the narrator is a character in the story
Answers: 2
You know the right answer?
(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for...
Questions
question
Mathematics, 13.02.2020 22:06
question
Biology, 13.02.2020 22:10
Questions on the website: 13722360