![]() |
VOOZH | about |
A Menu Driven program is a program that represents a menu of options to the user and different actions are performed based on different options. In this article, we will learn to write a Menu Driven program using Switch-case in C.
👁 Menu-Driven-program-using-Switch-case-in-C11
The below program demonstrates an example of a Menu-Driven program using a Switch case to calculate:
Output
Press 1 to calculate area of circle Press 2 to calculate area of square Press 3 to calculate area of sphere Enter your choice: 1 Enter radius: 5 Area of circle=78.5
Time Complexity: O(1)
Auxiliary Space: O(1)