Sarah wants to create a menu-driven program where the menu is displayed repeatedly until the user selects the "Exit" option. What control structure can assist her in achieving this?

  • Do-While Loop
  • For Loop
  • If-Else Statements
  • Switch Statement
To create a menu-driven program like Sarah's, the "Do-While Loop" is the most appropriate. It ensures that the menu is displayed at least once and then repeatedly as long as the user doesn't choose the "Exit" option, providing the desired functionality.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *