Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question # 2 TQ Marks-20) Write a FUNCTION that calculates how much bill user has to pay according to the usage of Electricity units. User

image text in transcribed

Question # 2 TQ Marks-20) Write a FUNCTION that calculates how much bill user has to pay according to the usage of Electricity units. User will provide just number of units he consumed in main function. Constraints: 1. Rate of the first 100 units is Rs15/unit, for 100-300 units - its Rs25/Unit and for more than that, its Rs27/Unit. 2. You have to add Nelum-Jehlum surcharge as 15% of total bill. 3. Now add TV charges RS50 in every bill. 4. If the bill exceeds RS500, give them discount of 3% on total. Check for these values: 1. Enter number of units: 1 a. Your total bill is RS: 67.25 2. Enter number of units: 10 a. Your total bill is RS: 222.5 3. Enter number of units: 120 a. Your total bill is RS: 2350 4. Enter number of units: 321 a. Your total bill is RS: 7931.74 5. Enter number of units: 500 a. Your total bill is RS: 13325

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Solaris 11.2 System Administration (oracle Press)

Authors: Harry Foxwell

1st Edition

007184421X, 9780071844215

More Books

Students also viewed these Databases questions