Question: Write a program to get electricity unit consumed and calculate total electricity bill according to the given condition: For first 200 units Rs., 0.50/unit For
Write a program to get electricity unit consumed and calculate total electricity bill according to the given condition: For first 200 units Rs., 0.50/unit For next 100 units Rs., 0.75/unit For next 100 units Rs., 1.20/unit For unit above 400 Rs., 1.50/unit If bill exceeds Rs. 300 then a surcharge of 20% will be charged and the minimum bill should be of Rs. 100 Example: Sample Input: 800 Expected output: Amount Charges: 895.00 Surcharge Amount: 179.00 Net Amount Paid By the Customer: 1074.00 Sample input: 80 Amount Charges: 40.00 Minimum bill should be of Rs. 100 Net Amount Paid By the Customer: 50.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
