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
c++ Program Description You are going to write a computer program/prototype to process mail packages that...
c++ Program Description You are going to write a computer program/prototype to process mail packages that are sent to different cities. For each destination city, a destination object is set up with the name of the city, the count of packages to the city and the total weight of all the packages. The destination object is updated periodically when new packages are collected. You will maintain a list of destination objects and use commands to process data in the list....
I was asked to write a program in CodeBlocks. C++ format. I've written the first half...
I was asked to write a program in CodeBlocks. C++ format. I've written the first half of the code but I am using else and if statements. I feel like the code is too long to do a simple calculation. In CodeBlock when you build and run your code, a new terminal window opens (in windows a new console window) and you can enter your inputs there. It is not like eclipse that you enter your inputs in console view....
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...
Business Problem-Solving Case Walmart and Amazon Duke It Out for E-Commerce Supremacy Walmart is the world’s...
Business Problem-Solving Case Walmart and Amazon Duke It Out for E-Commerce Supremacy Walmart is the world’s largest and most successful retailer, with $487.5 billion in 2014 sales and nearly 11,000 stores worldwide, including more than 4,000 in the United States. Walmart has 2.2 million employees and ranks first on the Fortune 500 list of companies. Walmart had such a large and powerful selling machine that it really didn’t have any serious competitors—until now. Today, Walmart’s greatest threat is Amazon.com, often...
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT