There are two things going on here. First the return when q is entered is taken care of by the if statement. The second is to keep looping while input is not c/r, and that's what the while...
Type: Posts; User: pbrockway2
There are two things going on here. First the return when q is entered is taken care of by the if statement. The second is to keep looping while input is not c/r, and that's what the while...
The general idea of your code is OK.
The while condition should not have anything to do with "Q", however. Also a "bad" input like "L" is not "C" AND it is not "R" etc.
---
if(input ==...