I\'m trying to create a switch statement inside a while loop based on an input take each iteration of the loop and quit the while loop if the default case is executed.