Write a program to calculate and print the electricity bill of a given customer. The customer ID, name, and unit consumed by the user should be captured from the keyboard to display the total amount to be paid to the customer.
The charges are as follow:
| Units | Charge per unit |
|---|---|
| up to 199 | @1.20 |
| 200 and above but less than 400 | @1.50 |
| 400 and above but less than 600 | @1.80 |
| 600 and above | @2.00 |
If bill exceeds Rs. 400 then a surcharge of 15% will be charged and the minimum bill should be of Rs. 100/-
Sample Input1:
1001
James
50
Sample Output1:
Customer ID: 1001
Customer Name: James
Units Consumed: 50
Amount Charged: 100
Surcharge Amount: 0
Net Amount Paid by the Customer: 100
Sample Input2:
1001
James
100
Sample Output2:
Customer ID: 1001
Customer Name: James
Units Consumed: 100
Amount Charged: 120.0
Surcharge Amount: 0.0
Net Amount Paid by the Customer: 120.0
Sample Input3:
1001
James
800
Sample Output3:
Customer ID: 1001
Customer Name: James
Units Consumed: 800
Amount Charged: 1600.0
Surcharge Amount: 240.0
Net Amount Paid by the Customer: 1840.0
1001
James
50
Sample Output1:
Customer ID: 1001
Customer Name: James
Units Consumed: 50
Amount Charged: 100
Surcharge Amount: 0
Net Amount Paid by the Customer: 100
Sample Input2:
1001
James
100
Sample Output2:
Customer ID: 1001
Customer Name: James
Units Consumed: 100
Amount Charged: 120.0
Surcharge Amount: 0.0
Net Amount Paid by the Customer: 120.0
Sample Input3:
1001
James
800
Sample Output3:
Customer ID: 1001
Customer Name: James
Units Consumed: 800
Amount Charged: 1600.0
Surcharge Amount: 240.0
Net Amount Paid by the Customer: 1840.0
| Solution in | C | JAVA | PYTHON |
|---|