Take a look at the `putStr' function. It omits the newline character that putStrLn writes at the end of the string.Thanks , it's working now like this :
loop :: Int -> IO ()
loop n = do
if n <= 100
then do
putStrLn (show n );
putChar ' ';
putStrLn (show (n * n )) ;
loop (n + 1);
else
return () ;
main :: IO ()
main = loop 1
But the outcome looks like this:
1
1
2
4
Can I somehow make it like this
1 1
2 4
3 9
Roelof
-- Jochem Berndsen | jochem@functor.nl