Weekday Name
Easy · Control Flow
switch n compares n to each case. A default branch handles everything else.
Write Weekday(n) that maps 1…7 to "Monday"… "Sunday". Any other number returns "?".
Next: Count Characters
Easy · Control Flow
switch n compares n to each case. A default branch handles everything else.
Write Weekday(n) that maps 1…7 to "Monday"… "Sunday". Any other number returns "?".
Next: Count Characters