Business requirement
An electricity provider bills the first 100 units at ₹2, the next 200 at ₹4, and remaining units at ₹7. A surcharge applies to larger bills.
- Charge the first 100 units at ₹2 per unit.
- Charge units 101–300 at ₹4 per unit.
- Charge every unit above 300 at ₹7 per unit.
- Add a 5% surcharge when the slab total is above ₹1,500.
- Do not accept negative units and show the final amount with two decimals.