title: Missing decimals when printing
body: <p>Below is some simple code I am working with:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  
  int main() {
      float f = 1.66f;
      int d = (int)f;
      double g = (double)d;
      cout.precision(6);
      cout&lt;&lt;g&lt;&lt;"\n";
  }
  </code></pre>
  
  <p>I want it to print <code>1.000000</code> but it prints only <code>1</code>. But, even after upgradation of int to double, doesn't it automatically convert it to an integer value?</p>