ok, i can see multiple problems, i'll start with the one you're asking about:
inside the
case 'Q':
block (start at line 64) ( you should call the
exit() function, or at least order the main function to return before writing
break;
.
other problems:
in the
case 'A':
block (line 26), the
if statement doesn't have a break inside it, while the
else have one.
you can either put another break inside the
if statement, or move the break that is inside the
else to outside it, like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
case 'A':
if (units <=10)
{
fees_a = 9.95;
cout<<"The charges are:"<< fees_a<< endl;
}
else
{
fees_a = (units - 10) * 2 + 9.95;
cout<<"The charges are:"<< fees_a<< endl;
}
break;
|
the same problem exists in the
case 'B':
block, you should fix that too.