Skip to content

Commit 53c5ea6

Browse files
add weekday-from-number challenge
1 parent 8aa1181 commit 53c5ea6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
pub fn weekday_from_number(day: u8) -> &'static str {
2+
// TODO: Implement the function here
3+
match day {
4+
1 => "Monday",
5+
2 => "Tuesday",
6+
3 => "Wednesday",
7+
4 => "Thursday",
8+
5 => "Friday",
9+
6 => "Saturday",
10+
7 => "Sunday",
11+
_ => "Invalid day number"
12+
}
13+
}

0 commit comments

Comments
 (0)