Skip to content

Instantly share code, notes, and snippets.

@crissyg
Last active July 19, 2017 15:00
Show Gist options
  • Save crissyg/d484bfc8f6fbea73dfe1a33af93157cb to your computer and use it in GitHub Desktop.
Save crissyg/d484bfc8f6fbea73dfe1a33af93157cb to your computer and use it in GitHub Desktop.
You are given two integers, a and b on separate lines. Output an integer that denotes a + b
--Haskell program
--Description: You are given two integers, a and b on separate lines. Output an integer that denotes a + b
--by: crissyg
solveMeFirst a b = a + b
main = do
val1 <- readLn --scan val1
val2 <- readLn --scan val2
let sum = solveMeFirst val1 val2
print sum --output sum to console
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment