- HackerRank link: hackerrank.com/challenges/fp-solve-me-first
- Difficulty: Easy
- Solution added: Haskell, Fsharp
main = do
a <- readLn :: IO Int
b <- readLn :: IO Int
print (a + b)main = doWe first create a block of main program.
a <- readLn :: IO Int
b <- readLn :: IO IntThen, we ask user input. Both a and b read Integer from the IO.
print (a + b)Last, we simply print the sum of a and b. Why we use print instead of putStrLn? Because it's a number. That's it!
