Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Solut... 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

An Introduction to Management Science Quantitative Approach to Decision Making

Authors: David R. Anderson, Dennis J. Sweeney, Thomas A. Williams, Jeffrey D. Camm, James J. Cochran

15th edition

978-1337406529

More Books

Students also viewed these Programming questions

Question

What is the geometric average return for the period

Answered: 1 week ago