Question: Write a program for XYZ-Electric billing company. First understand the following situation. This program calculates a customers bill for XYZ-Electric billing company. There are two

Write a program for XYZ-Electric billing company. First understand the following situation. This program calculates a customer’s bill for XYZ-Electric billing company. There are two types of customers: residential and commercial. There are two rates for calculating a bill: one for residential customers and one for commercial customers.

For residential customers, the following rates apply:

• Bill processing fee: Rs.4.50/-

• Basic service fee: Rs.20.50/-

• Unit Rate: Rs.7.50 per Unit

For commercial customers, the following rates apply:

• Bill processing fee: Rs.10.50/-

• Basic service fee: Rs.50.50/-

• Unit Rate: Rs.12.50 per Unit The program should ask the user for an account number (an integer) and a customer code.

Assume that R or r stands for a residential customer, and C or c stands for a commercial customer

Input: The customer’s account number, customer code & number of units consumed for a particular month.

Output: Customer’s account number and the billing amount.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Solut... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!