guessing-game
This commit is contained in:
8
guessing-game/src/guessing_game.gleam
Normal file
8
guessing-game/src/guessing_game.gleam
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user