>cout << "Amount Due = $" ,, amountDue << endl;
You forgot to hit the shift key here, it should be:
cout << "Amount Due = $" << amountDue << endl; if (minutes > 50)
amountDue = rServiceCost + ((minutes - 50) * rPerMinuteCharge);
cout << "Account number = " << accountNumber << endl;
cout << "Amount Due = $" << amountDue << endl;
else
amountDue = rServiceCost; When the body of a conditional or loop is more than one statement, you must surround it in braces to make a compound statement:
if (minutes > 50) {
amountDue = rServiceCost + ((minutes - 50) * rPerMinuteCharge);
cout << "Account number = " << accountNumber << endl;
cout << "Amount Due = $" << amountDue << endl;
}
else
amountDue = rServiceCost; >if dayMinutes > 75
Don't forget to put the condition in parentheses:
if (dayMinutes > 75) >I'm not sure where to calculate the night minutes over 100.
How about right after you calculate the day minutes over 75?
Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401