title: Convert scientific notation to decimal in C++
body: <p>I want to be able to output in decimal and not scientific for all cases in my code.</p>
  
  <p>If I have 122041e+08 then I want it to display as 122041000</p>
  
  <p>If I have 4.6342571e+06 then I want it to display as 4634257.1</p>
  
  <p>... and so on.</p>
  
  <p>Using my code, the output for 4.6342571e+06 is 4634257.100000</p>
  
  <pre><code>void conversion(double counts)
  {
    std::ostringstream ss;
    ss &lt;&lt; std::fixed &lt;&lt; counts;
    std::cout &lt;&lt; ss.str() &lt;&lt; " MeV";
  }
  </code></pre>
  
  <p>Can someone explain to me why it adds 0's to the end and if it's possible to remove them.</p>