title: break a loop when user enters negative number C++
body: <p>Doing a loop having user enter two inputs which will calculate in a function. The program is suppose to continue to run until either a negative number is entered for the price or for the markup.  A negative number for price or negative markup will never be sent to the calcRetail function.</p>
  
  <p>My code works up until I enter a negative number for markup. The loop continues. What am I missing so that the loop ends not only when a negative is entered for price but also when a negative number is entered for markup? </p>
  
  <pre><code>double calcRetail(double x = 0.0, double y = 0.0)
  {
      double retail = x * (1 + (y / 100));
      return retail;
  }
  int main()
  {
      double price = 0.0, markup = 0.0;
      while(price &gt;= 0)
      {
          cout &lt;&lt; "Enter the wholesale price of the item:" &lt;&lt; endl;
          cin &gt;&gt; price;
          if(price &gt;= 0)
          {
              cout &lt;&lt; "Enter the percent markup of the item:" &lt;&lt; endl;
              cin &gt;&gt; markup;
  
              cout &lt;&lt; "$" &lt;&lt; calcRetail(price,markup) &lt;&lt; endl;
          }
      }
  
      return 0;
  }
  </code></pre>