Hi all, I have finished writing the code for the following program. I have concerns with the pseudocode that I have written and the flow chart seems really complicated. I dont know how to build it.
Here is the question:
An Internet service provider has three different subscription packages for its customers:
Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour.
Package B: For $14.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour.
Package C: For $19.95 per month unlimited access is provided.
Write a program that calculates a customer s monthly bill. It should ask which package
the customer has purchased and how many hours were used. It should then display the total amount due.
Input Validation: Be sure the user only selects package A, B, or C. Also, the number of hours used in a month cannot exceed 744
Here is my program:
#include <iostream>
using namespace std;
cout << "\nEnter the package purchased: ";
cin >> package;
while(package!= 'A' && package!='a' && package!='B' && package!='b'&&
package!='C' && package!='c')
{cout <<"\nError! You must select package A, B, or C. ";
cout <<"Enter the package purchased: ";
cin >> package;}
cout <<"\nEnter the number of hours used: ";
cin >>hours;
cin.get();
while(hours < 0 || hours > 744)
{cout <<"\nError! Hours cannot be negative or exceed 744. \n\nYou must enter appropriate hours.";
cout <<"\n\nEnter the number of hours used. ";
cin >> hours;}