guessing-game

This commit is contained in:
Alexander Heldt committed 2025-11-01 13:47:10 +01:00
1 parent f83515caf0
commit d1c8114f07
10 files changed
+311

No files matched your search

+8
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"
}
}