Since you are now a computer science student everyone believes you can solve problems
that are not easily solved by common people. One day your father calls you and say’s I have no idea why
our electricity bill is too high. He aspects you to solve the question luckily you know your electric supply
company calculates the electricity bill according to per unit rate which depends on how many units you
consumed. You have to write the pseudo code to calculate the electricity bill according to the following
criteria.
Criteria: For the first 100 units rate is 5.Rs per unit. For every next 100 units rate increased by 2.Rs
from previous one e.g 101 to 200 units have 7.Rs per unit rate.
declare a variable
input the units
check if this value is more than 100, if not then
multiply the value of the variable by 5
if the value of the variable is more than 100,
then multiply the first 100 by 5 and the rest by 7
output the results
Comments
Leave a comment