Write a program that calculates a customer’s bill for a local cable company. There are two types of rates for calculating a cable bill: one for residential customers and one for business customers.
For residential customers, the following rates apply:
Bill processing fee: $4.50
Basic service fee: $20.50
Premium channels: $7.50 per channel
For business customers, the following rates apply:
Bill processing fee: $15.00
Basic service fee: $75.00 for first 10 connections, $5.00 for each additional connection
Premium channels: $50.00 per channel for any number of connections
The program should ask the user for an account number (an integer) and a customer code. Assume R or r stands for a residential customer, and B or b stands for a business customer.
The program should run infinite number of times, unless otherwise specified by the user to stop the execution.
Input The customer’s account number, customer code, number of premium channels to which the user subscribes, and, in the case of business customers, number of basic service connections.
Output Customer’s account number and the billing amount.