The Pseudocode for the problem is provided below, please comment if any doubts:
//This program will calculate the electric bill for the month
//input: Customer name, Old meter reading , new meter reading
//output: Customer name, Old meter reading , new meter reading, //kilowatts used, Total bill
Start
//Read the inputs
Display(“Enter the customer name:)
CustomerName = Input()
Display(“Enter the old meter reading:)
OldMeterReading = Input()
Display(“Enter the new meter reading:)
NewMeterReading = Input()
//compute the kilowatt used
KiloWattUsed= NewMeterReading- OldMeterReading
//declare the total Bill variable
totalBill=0
//If kilowatt used is less than 300
If(KiloWattUsed<=300), then
totalBill = 50
//if kilowatt used is greater than 300
Else
ExtraUsed= KiloWattUsed-300
totalBill = 50+ (0.05* ExtraUsed)
//display the ouputs
Display(CustomerName)
Display(OldMeterReading)
Display(NewMeterReading)
Display(KiloWattUsed)
Display(totalBill)
Screenshot of the Psedocode:
Get Answers For Free
Most questions answered within 1 hours.