We have a variable number
with the value 3
.
Add a switch statement,
with the following cases
and the messages to be displayed
for each case:
Case value | Message |
---|
1 | "This is number 1" |
2 | "This is number 2" |
3 | "This is number 3" |
If none of the cases match,
display "This is an invalid number".