The problem that i am working asks to calculate a customer's monthly bill. The customer has to input their name, which package they purchased, and how many hours were used. For example package a is for 9.95 a month 10 hours of access provided. Additional hours are 2.00 per hour. Im wondering if my syntax is correct...here's what i have so far...
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main()
{
//Declare variables
const double PACKAGE_A_RATE = 9.95;
const double PACKAGE_B_RATE = 14.95;
const double PACKAGE_C_RATE = 19.95;
char packageA;
char packageB;
char packageC;
char packageName;
double packageACharge;
double packageBCharge;
double packageCCharge;
double hours;
double totalDue;
string customerName;
cout << "Enter your name: ";
cin >> customerName;
cout << "Enter the package you purchased: ";
cin >> packageName;
cout << "Enter the number of hours used: ";
cin >> hours;
if(hours ==10)
{
packageACharge = PACKAGE_A_RATE;
}
else if(hours > 10)
{
packageACharge = (packageACharge + hours) % 2;
cout << packageACharge<<endl;
}
system("pause");
return 0;
}
can anyone help?