Do you know how to define your own functions? Personally, what I would do is to define a function for reading in the five numbers, then one function each corresponding to the first 4 menu options. You can then wrap the switch with its function calls in a loop that terminates on a flag that is set when the fifth menu option is selected.

You already more or less have the implementations of these five functions; it's a matter of separating them into these functions so you can call them precisely when you want.