A housing society having 400 members pay the electricity bill at the following rates: No. of Units consumed Charges/Unit (₹) For the First 200 units 2.65 For the next 300 units 3.90 Over 500 units 4.65 Surcharge @ 5% of
CS Professional · Information Technology and Systems Audit · PYQS · December 2021
A housing society having 400 members pay the electricity bill at the following rates: No. of Units consumed Charges/Unit (₹) For the First 200 units 2.65 For the next 300 units 3.90 Over 500 units 4.65 Surcharge @ 5% of the bill is to be added to the charges. Draw a flow chart for the above, which will read the house number and the number of units consumed and print out the total charges with the house number and the unit consumed.
Answer & Explanation:
Here's a description of the flowchart logic: Start Read House No. Initialize counter I = 0 Loop: I = I + 1 Decision: Is Units > 500? If Yes: Calculate Amount (Amt) = (Units - 500) * 4.65 + 300 * 3.90 + 200 * 2.65 If No: Go to next decision. Decision: Is Units > 200? If Yes: Calculate Amount (Amt) = (Units - 200) * 3.90 + 200 * 2.65 If No: Calculate Amount (Amt) = Units * 2.65 Calculate Total Charges (Chrg) = Amt + Amt * 0.05 (5% surcharge) Print House No, Units, Chrg Decision: Is I < 400? (To process all 400 members) If Yes: Go back to Loop (step 4) If No: Go to Stop. Stop
Topics: Programming Concepts
Related Questions in this Topic
- Write short notes on the following: Flow Chart
- Define Algorithm. Briefly explain the various control structures used in Algorithm.
- A company has appointed marketing professionals at a monthly salary of ₹50,000. At the time of their annual appraisal al...
- Write short notes on the following: Advantages of using Flow Charts
- What do you understand by Algorithm for any program? Discuss different types of control structures for classification of...