title: New line in haskell IO
body: <p>I am not able to print outputs in multiple lines with the following code.</p>
  <pre><code>average l = (sum l) / (fromIntegral (length l))
  
  readDoubles s1 s2 = putStr (s1++&quot;\n&quot;++s2) &gt;&gt;
                          do x &lt;- readDoublesHelper; return (&quot;The average is &quot; ++ (show (average x)) ++ &quot; \n&quot; ++ &quot;The maximum is &quot; ++ (show (maximum x)) ++ &quot;\n&quot; ++ &quot;The minimum is &quot; ++ (show (minimum x)) ++ &quot;\n&quot;)
  
  readDoublesHelper = putStr &quot;Enter a number: &quot; &gt;&gt;
                          do line &lt;- getLine;
                              if line == &quot;done&quot;
                              then return [];
                              else do xs &lt;- (readDoublesHelper)
                                      return ((read line :: Float): xs)
  
  interface = readDoubles &quot;Enter some numbers.&quot; &quot;When finished, type ’done’. \n&quot;
  </code></pre>
  <p>The output that I get is</p>
  <pre><code>*Main&gt; interface
  Enter some numbers.
  When finished, type ’done’. 
  Enter a number: 2
  Enter a number: 3
  Enter a number: 4
  Enter a number: 5
  Enter a number: 6
  Enter a number: 7
  Enter a number: done
  &quot;The average is 4.5 \nThe maximum is 7.0\nThe minimum is 2.0\n&quot;
  </code></pre>
  <p>But I want the output to be printed like this</p>
  <pre><code>The average is 4.5 
  The maximum is 7.0
  The minimum is 2.0
  </code></pre>