title: create menus in command line
body: <p>How can one create menus in the command line program? I've tried stuff like:</p>
  
  <pre><code>cin &gt;&gt; input;
  switch (input) {
    case (1):
      // do stuff
    case (2):
      // ...
  }
  </code></pre>
  
  <p>but then I've had the problem of sub-menus, and going back to the same menu, etc. The first program I wrote (apart from exercises) that tried to use the <code>switch</code> idea for the menus had <code>goto</code> statements because the alternative was heaps of (at the time) complicated loops.</p>