Created
February 3, 2017 07:26
-
-
Save weidagang/22ab6131728caf9ac19a355424e73aca to your computer and use it in GitHub Desktop.
Haskell IO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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