fork download
  1. main = do
  2. let readFloat :: String -> Float
  3. readFloat = read
  4. nombre <- getLine
  5. nota1 <- fmap readFloat getLine
  6. nota2 <- fmap readFloat getLine
  7. promedio <- (nota1 + nota2) / 2
  8. if promedio >= 60
  9. then
  10. putStr(nombre ++ " ha pasado el curso")
  11. else do
  12. putStr(nombre ++ " no ha pasado el curso")
  13.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Luis
80
90
compilation info
[1 of 1] Compiling Main             ( prog.hs, prog.o )

prog.hs:2:6:
    Illegal signature in pattern: String -> Float readFloat
        Use -XPatternSignatures to permit it
stdout
Standard output is empty