"#include <iostream>
using namespace std;
int main ()
{
// variable names
int hours;
char ilett;
float total, total2, total3, rate;
cout << "Please Type" << endl << "A for Package A" << endl << "B for package B" << endl << "C for package C" << endl;
cin >> ilett;
switch (ilett)//user slects a package
{
case 'a'://user selects upper or lowercase a
case 'A': cout << "you have chosen package A"<< endl;
cout << "please enter number of hours"<< endl;
cin >> hours;
total3= 19.95;
rate = 9.95;
if (hours > 744)//max hours is 744
{
cout << "invalid amount of hours please try again.\n";
cin >> hours;
}
if(hours > 10)//if user goes over limit of package
{
total = ((hours-10)*2)+(rate);
total2 = 14.95;
cout << "your total is $" << total<< endl;
if(total > total2)
cout << "If you had Package B you would have saved $" << total - total2 << endl;
if(total > total3)
cout << "if you had package C you would have saved $" << total - total3 << endl;
}
if(hours <= 10)// default package
{
total = (rate);
cout << "your total is $" << total << endl;
}
break;
case 'b'://user selects upper or lower case b
case'B':cout << "you have chosen package B" << endl;
cout << "please enter number of hours" << endl;
cin >> hours;
rate = 14.95;
if (hours > 744) // max hours is 744
{
cout << "invalid amount of hours please try again.\n";
cin >> hours;
}
if(hours > 20)// if user goes over limit of package
{
total = (hours-20) + (rate);
cout << "your total is $" << total << endl;
}
if(hours <= 20)// default package
{
total = (rate);
cout << "your total is $" << total << endl;
}
break;
case 'c'://user selects upper or lowercase c
case 'C': cout << "you have chosen package C" << endl;
cout << "please enter number of hours" << endl;
cin >> hours;
rate = 19.95;
if (hours > 744) //max amount of hours
{
cout << "invalid amount of hours please try again.\n";
cin >> hours;
}
total = (rate); //default package
cout << "your total is $" << total << endl;
break;
default: cout << "your choice is invalid.\n"; //if user does not select A, B, or C
}
return 0;
}"