13 lines
249 B
Haskell
13 lines
249 B
Haskell
doGuessing num = do
|
|
putStrLn "Enter your guess:"
|
|
guess <- getLine
|
|
if (read guess) < num
|
|
then do putStrLn "Too low!"
|
|
doGuessing num
|
|
else if (read guess) > num
|
|
then do putStrLn "Too high!"
|
|
doGuessing num
|
|
else do putStrLn "You Win!"
|
|
|
|
|