Question

A Cable Company has hired you to write a C++ program that calculates the monthly bill...

A Cable Company has hired you to write a C++ program that calculates the monthly bill for their customers. It must meet the following specifications:

  1. The program must first greet the customer.
  2. The program must then ask for their name, the number of basic channels packages they’re subscribed to, then the number of premium channel packages they’re subscribed to.
  3. The bill is calculated as follows:
    1. There is a $75 base fee.
    2. The first 3 basic channels packages are free, after that it costs $12 for each additional package.
    3. Each premium channel package costs $15.
    4. There final total is subject to a 2.35% tax.
  4. The program terminates with addressing the user by their name and then telling them how much they owe for the month.

Homework Answers

Answer #1

CODE :

#include <iostream>
using namespace std;

int main()
{
string name;
int bc,pc;
cout<<"Hello there!"<<endl;
cout<<"Please enter your name : "<<endl;
cin>>name;
cout<<"Enter the number of basic channel packages : "<<endl;
cin>>bc;
cout<<"Enter the number of premium channel packages : "<<endl;
cin>>pc;
  
float cost = 75;
if(bc>3){
cost = cost+(bc-3)*12;
}
cost = cost + pc*15;
cost = cost*1.0235;
cout<<name<<", your bill for the month is : "<<cost;
return 0;
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Program Description A local company has requested a program to calculate the cost of different hot...
Program Description A local company has requested a program to calculate the cost of different hot tubs that it sells. Use the following instructions to code the program: File 1 - HotTubLastname.java Write a class that will hold fields for the following: The model of the hot tub The hot tub’s feature package (can be Basic or Premium) The hot tub’s length (in inches) The hot tub’s width (in inches) The hot tub’s depth (in inches) The class should also...
Written in MASM Assembly Problem Definition: Write a program to calculate Fibonacci numbers. • Display the...
Written in MASM Assembly Problem Definition: Write a program to calculate Fibonacci numbers. • Display the program title and programmer’s name. Then get the user’s name, and greet the user. • Prompt the user to enter the number of Fibonacci terms to be displayed. Advise the user to enter an integer in the range [1 .. 46]. • Get and validate the user input (n). • Calculate and display all of the Fibonacci numbers up to and including the nth...
The questions to answer regarding the case material are as follows: Company overview . How the...
The questions to answer regarding the case material are as follows: Company overview . How the company uses its own products or services to enhance the total compensation for its employees. The internal strengths and weaknesses you identified and how the company responded to these factors from a total rewards perspective. The external opportunities and threats you identified and how the company responded to these factors from a total rewards perspective. Examples of traditional and non-traditional rewards and how they...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From...
Sign In INNOVATION Deep Change: How Operational Innovation Can Transform Your Company by Michael Hammer From the April 2004 Issue Save Share 8.95 In 1991, Progressive Insurance, an automobile insurer based in Mayfield Village, Ohio, had approximately $1.3 billion in sales. By 2002, that figure had grown to $9.5 billion. What fashionable strategies did Progressive employ to achieve sevenfold growth in just over a decade? Was it positioned in a high-growth industry? Hardly. Auto insurance is a mature, 100-year-old industry...