EXAMPLE 6.8 Gas supply billing
5555
The Domestic Gas supply Company records its customers gas usage figures on a customer usage file. Each record on the file contains the customer number, customer name, customer address, and gas usage expressed in cubic metres. Design a solution algorithm that will read the customer usage file, calculate the amount owing for gas print a report isting each customer's number, name ,address, gas usage and the amount owing.
The company bils its customers according to the following rate. if the customer's usage is 60 cubic metres or less, a rate of $2.00 per cubic metre is appied, if the customer's usage is more than 60 cubic metres, then a rate of $1.75 per cubic metre is cubic applied for the first 60 cubic metres and $1.50 per cubic metre for the remaining usage.
At the end of the report, print the total number of customers and the total amount owing to the company