Skip to content

Instantly share code, notes, and snippets.

@alcidesfp
Created September 14, 2013 05:13
Show Gist options
  • Save alcidesfp/6558996 to your computer and use it in GitHub Desktop.
Save alcidesfp/6558996 to your computer and use it in GitHub Desktop.
main = do
putStrLn "¡Hola!, ¿Cuál es tu nombre?"
nombre <- getLine
putStrLn "¿En qué año naciste?"
ann_nac <- getLine
let edad = 2014 - (read ann_nac)::Integer
putStrLn ("Hola " ++ nombre)
putStrLn ("En el año 2014 tendrás " ++ show edad ++ " años.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment