Code:
if (toupper(letter) == 'N' && numCredHour<15)
{
totTuition=numCredHour*400;
cout<<"Your Total Tuition is: $"<<totTuition<<endl;
}
else (numCredHour>15)
{
totTuition=6000;
cout<<"Your Total Tuition is: $6000"<<endl;
}
A quick review shows this mistake - the proper syntax is as follows:
Code:
if (condition)
{
// executes if condition is TRUE
}
else
{
// executes if condition is FALSE
}
Whereas you have:
Code:
else (numCredHour>15)
That extra line after the "else" statement does not belong there.
If you want the "else" to test another condition, then the proper syntax would be:
Code:
if (condition1)
{
// executes if condition1 is TRUE
}
else if (condition2)
{
// executes if condition1 is FALSE and condition2 is TRUE
}
[EDIT] Too slow...