guessing-game

This commit is contained in:
Alexander Heldt
2025-11-01 13:47:10 +01:00
parent f83515caf0
commit d1c8114f07
10 changed files with 311 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
pub fn reply(guess: Int) -> String {
case guess {
n if n < 41 -> "Too low"
41 | 43 -> "So close"
n if n > 43 -> "Too high"
_ -> "Correct"
}
}