title: Decimals not displaying when using Float or Double type
body: <p>My code is this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  int main()
  {
      using namespace std;
  
      const float dollar = 1.00;
  
      cout &lt;&lt; "You have " &lt;&lt; dollar*10.00 &lt;&lt; " dollars." &lt;&lt; endl;
  
      cin.get();
      cin.get();
  
      return 0;
  }
  </code></pre>
  
  <p>I am a beginner to c++. I typed this code just playing around and assumed that the console would display "You have 10.00 dollars, but it actually displays that I have "10" and not "10.00" dollars. Could someone tell me why this is?</p>