A basic service fee of 5 is charged no matter how much


The electricity accounts of residents in a very small town are calculated as follows:

* If 500units or fewer are\ used, the cost is 2cents per unit.

* If more than 500 but not more than 1000units are used, the cost is $10 for the first 500units and 5cents for every unit in excess of 500.

* If more than 1000units are used, the cost is $35 for the first 1000units plus 10cents for every unit in excess of 1000.

* A basic service fee of $5 is charged, no matter how much electricity is used.Write a program that enters the following five consumptions into a vector and uses a for loop to calculate and display the total charge for each one: 200, 500, 700, 1000, 1500. (Answers: $9, $15, $25, $40, $90)

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: A basic service fee of 5 is charged no matter how much
Reference No:- TGS02209306

Expected delivery within 24 Hours