Skip to content

Instantly share code, notes, and snippets.

@weidagang
Created February 3, 2017 07:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weidagang/22ab6131728caf9ac19a355424e73aca to your computer and use it in GitHub Desktop.
Save weidagang/22ab6131728caf9ac19a355424e73aca to your computer and use it in GitHub Desktop.
Haskell IO
readInt :: IO Int
readInt = readLn
main = do
print "Press any key to start:"
line <- getLine
print "Type the first integer x:"
x <- readInt
print "Type the second integer y:"
y <- readInt
print $ show(x) ++ "+" ++ show(y) ++ "=" ++ show(x + y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment