Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Write a program to implement a simple text-based menu for user choices.

Medium

Problem Statement

Write a program to implement a simple text-based menu for user choices.

Sample Input

N/A (User interaction through the menu)

Sample Output

Menu:
1. Option 1
2. Option 2
3. Option 3
4. Exit
Choose an option: Exiting...

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <iostream> int main() { // Logic for menu-driven program return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
N/A (User interaction through the menu)
Expected Output
Menu:
1. Option 1
2. Option 2
3. Option 3
4. Exit
Choose an option: Exiting...