#include <iostream>
usingnamespace std;
int main ()
{
int choice;
int channel;
int con;
double total;
double A = 25;
double B = 90;
double C = 90;
double D = 7.50;
double E = 5.00;
//Display
cout << " \t\t\tCable Company Billing\n\n";
cout << "1. For Residence Customers\n";
cout << "2. For Business Customers\n";
cout << "Enter your choice 1 or 2: ";
cin >> choice;
if (choice >=1 && choice <=2)
{
cout << "How many Premium channels subscribed in?: ";
cin >> channel;
switch (choice)
{
case 1:
{
total = A + (channel)*D;
break;
}
case 2:
{
if(channel > 0)
{
channel = 50;
}
total = B + (channel);
break;
}
default:
cout<<"You enter a wrong value!"<<endl;
cout << "The valid choices are 1 through 3. \n Run the program again.";
}
{
if(choice = 2) //Here the total will just be total it wont add the (con-10)*D;
{
cout << "How many connections All in All?: ";
cin >> con;
switch (choice)
case 3:
{
total = B + (con - 10)*D; //here it will only tell the total it wont add up the(con-10)*D;
break;
}
}
}
cout << "The total charges is equal to: $"<<total<<endl;
}
elseif (choice !=2)
{
cout << "The valid choices are 1 through 2. \n Run the program again.";
}
return 0;
}