Answer to Question #262952 in Algorithms for Alunsina

Question #262952

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.


1
Expert's answer
2021-11-11T07:30:06-0500
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS