Level 1 (Basic Switch Usage)
1. Day of Week
Input a number (1-7) and display the corresponding day.
Example:
Input: 3
Output: Wednesday
2. Calculator
Input two numbers and an operator (+, -, *, /) and perform the operation using switch.
Example:
Input: 10 20 +
Output: 30
3. Month Name
Input a month number (1-12) and display the month name.
Example:
Input: 12
Output: December
4. Vowel Checker
Input a character and determine whether it is a vowel or consonant using switch.
Example:
Input: a
Output: Vowel
5. Grade Description
Input a grade (A, B, C, D, F) and display a message.
Example:
Input: A
Output: Excellent
Level 2 (Intermediate Switch Usage)
1. Menu Driven Calculator
Display a menu:
1. Add
2. Subtract
3. Multiply
4. Divide
Perform the selected operation using switch.
2. Simple ATM Menu
Display:
1. Check Balance
2. Withdraw
3. Deposit
4. Exit
Perform the selected action using switch.
3. ASCII Category Checker
Input a character and determine whether it is:
Uppercase letter
Lowercase letter
Digit
Special character
Use switch where possible.
4. Number of Days in a Month
Input month number and display the number of days.
Example:
Input: 2
Output: 28 Days
5. Area Calculator
Menu:
1. Circle
2. Rectangle
3. Square
4. Triangle
Calculate area based on user choice.
Level 3 (Advanced Switch Practice)
1. Mini Banking System
Menu:
1. Deposit
2. Withdraw
3. Check Balance
4. Transaction History
5. Exit
Use a loop with switch until the user exits.
2. Student Result System
Menu:
1. Enter Marks
2. Display Grade
3. Check Pass/Fail
4. Exit
Use switch to navigate options.
3. Electricity Bill Generator
Menu:
1. Domestic
2. Commercial
3. Industrial
Calculate bill according to selected category.
4. Restaurant Ordering System
Menu:
1. Pizza
2. Burger
3. Sandwich
4. Coffee
5. Exit
Allow multiple orders and calculate total bill.
5. Scientific Calculator
Menu:
1. Addition
2. Subtraction
3. Multiplication
4. Division
5. Modulus
6. Power
7. Square Root
8. Exit
Use a loop and switch to repeatedly perform operations.