An electric company bases its charges on two rates, customers are charged P25.00 per kilowatt-hour for the first 300 kilowatt-hours used in a month and P30.00 each for all kilowatt-hours used thereafter. Compute for the amount due from a customer after reading the kilowatt-hours used. Assume that there are 100 records of customers.
Algorithm:
Start
Declare variable kilowattHour
Declare variable amountDue
Declare variable i
for i=1 to 100 Step 1
Read kilowattHour from the user
if kilowattHour<=300 then
amountDue=kilowattHour*25.00
else
amountDue=300*25.00+(kilowattHour-300)*30.00
End if
Display amountDue
end for
Stop
Comments
Leave a comment