I am writing a program that starts by printing a menu. The user then picks 1-6 from the options. If they pick 1, it should print an addition problem using two random integers. If they answer "-1" to the problem, the main menu should reprint, giving them the option to choose a different menu option. I have it working almost perfectly, except when they type "-1" to bring the menu back up, it appears as expected... BUT if they type "6" as their new menu choice, it prints another math problem (treats it like the answer was 1), instead of printing the exit statement "Come back soon!". Any help is much appreciated!
On line 59 you do not take the result from printMenu(), instead you use the value from menu originally passed to goSwitch(...).
Further more: On line 63 goSwitch(...) is called regardless of the menu previously chosen. It should be in the else branch. Again: you do not use the result of that call.
Line 64/65: Two returns. What is it that you want to return?
I suggest that you don't mark the question as solve when it isn't. Changing the original post so that the answer doesn't make sense isn't that good either.
Line 60: menu = printMenu();
Line 67: return goSwitch(menu);