Yardım edebilecek oln var mı acaba?
The electricity accounts of residents in a very small town are calculated as follows:
• if 500 units or less are used the cost is 2 cents per unit;
• if more than 500, but not more than 1000 units are used, the cost is $10 for the
first 500 units, and then 5 cents for every unit in excess of 500;
• if more than 1000 units are used, the cost is $35 for the first 1000 units plus 10
cents for every unit in excess of 1000;
• in addition, a basic service fee of $5 is charged, no matter how much electricity is
used.
Write a program which 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.