title: My numbers keep rounding?
body: <p>I'm writing a simple program for my class to calculate and display certain numbers, and my code all works with no issue, however on the display some of my numbers are getting rounded where I don't want them to be. I have the precision set to two decimal places because a few of the input numbers are decimals, but for example, if the answer is 3000, the number 2999 is being displayed.</p>
  
  <p>Here is my code, if this helps</p>
  
  <pre><code>int main()
  {
  
      double expense = 0.0;
      double expenseTotal = 0.0;
      double income = 0.0;
      double incomeTotal = 0.0;
  
      double netProfit = 0.0;
      double netIncome = 0.0;
      double netExpense = 0.0;
  
      int incNo = -1;
      int expNo = -1;
  
      cout &lt;&lt; "ENTER A NEGATIVE NUMBER TO STOP INCOME AMOUNT DATA ENTRY." &lt;&lt; endl &lt;&lt; endl;
  
      do
      {
          cout &lt;&lt; "Enter Income Amount: ";
          cin &gt;&gt; income;
          netIncome = income;
          incomeTotal += netIncome;
          incNo += 1;
  
      } while (income &gt; 0);
  
      cout &lt;&lt; endl &lt;&lt; "ENTER A NEGATIVE NUMBER TO STOP EXPENSE AMOUNT DATA ENTRY." &lt;&lt; endl &lt;&lt; endl;
  
      do
      {
          cout &lt;&lt; "Enter Expense Amount: ";
          cin &gt;&gt; expense;
          netExpense = expense;
          expenseTotal += netExpense;
          expNo += 1;
  
      } while (expense &gt; 0);
  
  
      cout &lt;&lt; endl &lt;&lt; "Total of the " &lt;&lt; incNo &lt;&lt; " income amounts entered ----&gt; $" &lt;&lt; fixed &lt;&lt; setprecision(2) &lt;&lt; incomeTotal &lt;&lt; endl;
      cout &lt;&lt;"Total of the " &lt;&lt; expNo &lt;&lt; " expense amounts entered ----&gt; $" &lt;&lt; fixed &lt;&lt; setprecision(2) &lt;&lt; expenseTotal &lt;&lt; endl;
      netProfit = incomeTotal - expenseTotal;
  
      if (netProfit &gt; 0)
          {
              cout &lt;&lt; "Net Profit earned ----&gt; $" &lt;&lt; fixed &lt;&lt; setprecision(2) &lt;&lt; netProfit;
              cout &lt;&lt; endl;
          }
  
      else
          {
          cout &lt;&lt; "Net Loss incurred ----&gt; $" &lt;&lt; fixed &lt;&lt; setprecision(2) &lt;&lt; netProfit;
          cout &lt;&lt; endl;
          cout &lt;&lt; "Note . . . Loss figire most be reported to company CEO." &lt;&lt; endl &lt;&lt; endl;
          }
  
  
      return 0;
  }
  </code></pre>