Hey guys! Kind of a basic question but I cant get it right. Im using a do while loop to run a series of menu options. The options go through 1,2,3,4 and 0. The while condition to keep the loop running is when the choice variable for the menu is not equal to 0. When 0 is entered the program ends. This all works smoothly. I need to add something that makes it so that if something other than 1,2,3,4,0 is entered I get an invalid choice error and the loop continues running. I tried doing an if statement like this :
This sort of worked but it gave me some issues and wasn't smooth. What code do I need to put in place in the loop to give me this invalid option message consistently.