I am trying to get a numeric value from the user (ranging 1-10) and using conditional statements (if number >= 1 && <=3) print out health status (e.g. putStrLn "your health is poor") but getting error message that I can't go past
health :: IO ()
health = do
putStrLn "State your health using numbers 1 - 10: "
num <- getLine
--putStrLn "Your health is: "
if num >=1 && <=3
then
do putStrLn "Your health is poor"
else if num >=4 && getLine <=7
then putStrLn "Your health is OK"
else if num >=8 && getLine<=10
then putStrLn "your health is fanstastic"
else "Wrong health range indicated"
Error message:
healthCheck.hs:9:1: warning: [-Wtabs]
Tab character found here, and in five further locations.
Please use spaces instead.
|
9 | --putStrLn "Your health is: " | ^^^^^^^^
healthCheck.hs:10:39: error: parse error on input ‘<=’
|
10 | if num >=1 && <=3 |