Files
haskell/numGuess1.hs

13 lines
249 B
Haskell
Raw Normal View History

2017-02-07 20:06:59 +00:00
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!"