When I use this code it's print newline after result. How I can don't write newline?
import System.IO
main :: IO ()
main = do
a <- getLine
b <- getLine
let aa = read a :: Int
let bb = read b :: Int
let cc = aa + bb
print cc
print
is defined as putStrLn . show
, the fix is to use putStr . show $ cc
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With