Answer to Question #240309 in C++ for adil

Question #240309

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.


1
Expert's answer
2021-09-22T00:00:11-0400

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


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