subject

(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: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:00, SoccerHalo
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
image
Computers and Technology, 23.06.2019 00:00, destinysmithds7790
Suppose you have 9 coins and one of them is heavier than others. other 8 coins weight equally. you are also given a balance. develop and algorithm to determine the heavy coin using only two measurements with the of the balance. clearly write your algorithm in the form of a pseudocode using the similar notation that we have used in the class to represent sorting algorithms
Answers: 1
image
Computers and Technology, 23.06.2019 01:40, littlebirdd987
You have a linux system that has a 1000gb hard disk drive, which has a 90gb partition containing an ext4 filesystem mounted to the / directory and a 4gb swap partition. currently, this linux system is only used by a few users for storing small files; however, the department manager wants to upgrade this system and use it to run a database application that will be used by 100 users. the database application and the associated data will take up over 200gb of hard disk space. in addition, these 100 users will store their personal files on the hard disk of the system. each user must have a maximum of 5gb of storage space. the department manager has made it very clear that this system must not exhibit any downtime as a result of hard disk errors. how much hard disk space will you require, and what partitions would you need to ensure that the system will perform as needed? where would these partitions be mounted? what quotas would you implement? what commands would you need to run and what entries to /etc/fstab would you need to create? justify your answers.
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, AM28
Does read theory have answers keys ?
Answers: 1
You know the right answer?
(Wattan Corporation) is an Internet service provider that charges customers a flat rate of $7.99 for...

Questions in other subjects: