Commit 52ad049
committed
feat: Implement switch-case to display day name based on input number
🧠 Logic:
- Prompt user for a day number (1–7) using Scanner.
- Use a `switch` statement to map:
1 → Monday, 2 → Tuesday, 3 → Wednesday, ..., 7 → Sunday.
- For any number outside this range, default case handles invalid input.
- Demonstrates use of classic `switch` syntax with `break` statements.
Signed-off-by: Somesh diwan <[email protected]>1 parent f1cafaf commit 52ad049
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments