title: Need my output to be in this form XXX.XXX c++
body: <p>for example im getting an area of 6 for a triangle, i need my output to show 006.000</p>
  
  <p>i know setprecision will do the trick for limiting the decimal places to three but how do i place zeros in front of my solutions? </p>
  
  <p>this is what i have </p>
  
  <p>CTriangle Sides(3,4,5);</p>
  
  <pre><code>cout &lt;&lt; std::fixed &lt;&lt; std::setprecision(3);
  
  cout &lt;&lt; "\n\n\t\tThe perimeter of this tringle is   = " &lt;&lt; Sides.Perimeter();
  
  cout &lt;&lt; "\n\n\t\tThe area of the triangle is        = " &lt;&lt; Sides.Area();
  
  cout &lt;&lt; "\n\n\t\tThe angle one is                   = " &lt;&lt; Sides.Angleone();
  
  cout &lt;&lt; "\n\n\t\tThe angle two is                   = " &lt;&lt; Sides.Angletwo();
  
  cout &lt;&lt; "\n\n\t\tThe angle three is                 = " &lt;&lt; Sides.Anglethree();
  
  cout &lt;&lt; "\n\n\t\tThe altitude one of the triangle   = " &lt;&lt; Sides.Altitudeone();
  
  cout &lt;&lt; "\n\n\t\tThe altitude two of the triangle   = " &lt;&lt; Sides.Altitudetwo();
  
  cout &lt;&lt; "\n\n\t\tThe altitude three of the triangle = " &lt;&lt; Sides.Altitudethree();
  </code></pre>
  
  <p>with the output being </p>
  
  <pre><code>            The perimeter of this triangle is   = 12.000
  
              The area of the triangle is        = 6.000
  
              The angle one is                   = 90.000
  
              The angle two is                   = 36.870
  
              The angle three is                 = 53.130
  
              The altitude one of the triangle   = 2.400
  
              The altitude two of the triangle   = 6.667
  
              The altitude three of the triangle = 3.750
  </code></pre>
  
  <p>but i need all the answers to be in this form XXX.XXX regardless of what my solutions are.(because the values will change)</p>
  
  <p>any help is appreciated, thanks!</p>