For instance, the user enters in a number, for example 5, and it is stored into a int variable n. Now I want to make a menu where it will display 5 options and the user can enter in a number 1 - 5. Can I make it so that there will be n (5) choices (if/switch statements) to choose from depending on the user input while the program is running?
I was thinking of maybe using a for loop that will continually create if/switch statements. Maybe with a static function? (I'm still a little confused about what static statements do. I remember reading how they persist even after the function conclude. Please correct me if I'm wrong.)