title: Truncate float so as to have only two decimals
body: <p><strong>C++</strong></p>
  
  <p>I would like to <code>cout</code> <code>float f = 2.3333</code>, but only with two decimals. How do I do that?
  I remember something like this, but it doesn't work:</p>
  
  <pre><code>cout &lt;&lt; f:2 &lt;&lt; endl;
  </code></pre>