I am having a hard time trying to figure out how to end my program as soon as the word "NOMORE" is entered.
I have researched similar threads suggesting the use of "if, break" or "if, go to".
Although the program will end after entering "NOMORE", I'd like to know if it's possible to end without processing the remaining modules (calcTicket, printInfo).
int main ()
{
string licensePlate;
double vehicleSpeed = 0, zoneSpeed = 0, ticketPrice, base = 0, fee = 0;
while (licensePlate !="NOMORE")
{
getInfo(licensePlate, vehicleSpeed, zoneSpeed);
if (licensePlate == "NOMORE")
break;
calcTicket(vehicleSpeed, zoneSpeed, ticketPrice, base, fee);
printInfo(licensePlate, vehicleSpeed, zoneSpeed, ticketPrice);
}
return 0;
}