title: Having trouble multiplying variables in c++. (c++ doesn't want to multiply them unless hardcoded)
body: <p>I recently picked up cpp and have been doing a couple very small projects to familiarize myself with the language, and I've run into a dilemma that I can't figure out no matter where I look on the web. </p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main(){
      double salesTax = 0.875, gross = 0, tax = (gross*salesTax), total = (salesTax + gross); //Variables 
  
      cout &lt;&lt; "Welome to StoreMart!" &lt;&lt; endl;
  
      cout &lt;&lt; "How much is your total? "; //asks user for an amount of money spent (not including tax).
      cin &gt;&gt; gross; //saves total spent in the gross variable
  
      cout &lt;&lt; "\n\nThat brings your total with tax to $" &lt;&lt; total &lt;&lt; "." &lt;&lt; endl; //prints the users total with tax.
  
      cout &lt;&lt; "Price: " &lt;&lt; gross &lt;&lt; "$ \n\nSales Tax: $" &lt;&lt; tax &lt;&lt; " @" &lt;&lt;
          salesTax &lt;&lt; "% \n\nTotal: $" &lt;&lt; total &lt;&lt; endl; //prints out something similar to the receipts you get at Wal-Mart.
  
      return 0;
  }
  </code></pre>
  
  <p>As you can tell I was building a small cash register type program, however the problem is that whenever run I only get an output that looks something like this.</p>
  
  <p><a href="https://imgur.com/7ndthUX" rel="nofollow noreferrer">http://imgur.com/7ndthUX</a> (can't upload images til' 10 points so hopefully imgur is fine :))</p>
  
  <p>Any help would be appreciated (don't mind if my math is off I'm more interested in getting my program to work correctly than I am in getting the math perfect.) </p>