need help with this assignment. im having trouble with if and else. I enter package A and then it ask me for the hours twice. just run it if you dont get me. here are a few examples of how running the program should look, please help me!:S
example 1
Customer name: Ben Sanders
Which package was purchased? A
How many hours were used? 700
Customer name: Goofus Gallant
Package A
The total amount due is $ 1389.95
Ex 2
Customer name: Ikant Count
Which package was purchased? B
How many hours were used? 678
Customer name: blah blah
Package B
The total amount due is $ 672.95
ex 3
Customer name: help me
Which package was purchased? C
Customer name: Igot Money
Package C
The total amount due is $ 19.95
#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
using namespace std;
int main()
{
int hours;
double cost;
string name;
char package;
cout <<"Enter customer name:";
getline(cin, name);
cout <<"select the following package:" << endl;
cout <<"Package A $9.95 per month, 10 hours of access, additional hours are $2.00 per hour" << endl;
cout <<"Package B $14.95 per month, 20 hours of access, additional hours are $1.00 per hour" << endl;
cout <<"Package C $19.95 per month, unlimited hours" << endl;
cout <<"Enter your choice:";
cin >> package;
if (package == 'A' || 'a')
cout <<"Enter hours used:";
cin >> hours;
if (hours >= 10)
(9.95 + (hours - 10) * 2);
else
cost = 9.95;
if (package == 'B' || 'b')
cout <<"Enter hours used:";
cin >> hours;
if (hours >= 20)
(14.95 + (hours - 20) * 2);
else cost = 14.95;
if (package == 'C' || 'c')
cout <<"19.95:" << endl;
cout << cost;
system("pause");
return 0;
}