Ticket #6146: Main.hs

File Main.hs, 260 bytes (added by emcdowell, 3 years ago)

Main.hs

Line 
1module Main (main) where
2
3main :: IO ()
4main = do
5    putStrLn "First number?  "
6    num1 <- readLn :: IO Int
7    putStrLn "Second number? "
8    num2 <- readLn :: IO Int
9    let total = num1 + num2
10    putStrLn $ "The sum is " ++ (show total) ++ "."