Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ programming w ith conditional statements Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types

C++ programming with conditional statements

Write a program that calculates and prints the bill for a cellular telephone company. The company offers two types of service: Regular and Premium. The rates vary, depending on the type of service. The rates are computed as follows: Regular service: $10.00 The first 50 minutes are free. Any minutes over 50 are $0.20 per minute. Premium service: $25.00 The first 75 minutes from 6:00 a.m. to 6:00 p.m. are free and minutes over 75 between these times are $0.10 per minute. The first 100 minutes from 6:00 p.m. to 6:00 a.m. are free and minutes over 100 are $0.05 per minute. Your program should prompt the user to enter an account number, a service code (type char). A service code of R or r means regular service and a service code of P or p means premium service. Treat any other characters as an error. For Regular service your program should ask for the total number of minutes used. Then output the account number, type of service, number of minutes used and the amount due. For Premium service your program should ask for the total number of minutes used between 6:00 a.m. to 6:00 p.m., then the total number of minutes used between 6:00 p.m. to 6:00 a.m. Then output the account number, type of service, the number of minutes used during the day, the amount due for daytime minutes, the number of minutes used during the evening, the amount due for evening minutes, and the total due for both.

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions