title: How to make rounded percentages add up to 100% in C#
body: <p>I want to know the percentage increase in the price being rounded off, I have 3 textboxes in winforms : <br/> txtCost_Price, SalesPrice, and txtMarkup.<br/>value &quot;txtCost_Price&quot; is = 52500<br/>and the value of &quot;SalesPrice&quot; is = 54300<br/>result of &quot;txtMarkup&quot; = 3.42857142857143<br/>how to make percentage result from txtMarkup not have multiple numbers after comma? I use Indonesian currency.</p>
  <pre><code>double CostPrice; double results, SalesPrice;
  
  CostPrice = Convert.ToInt32(C_1_1_txtCost_Price.Text); 
  SalesPrice = Convert.ToInt32(C_1_3_SalesPrice.Text); 
  results = (SalesPrice - CostPrice) / CostPrice * 100;
   
  C_1_2_txtMarkup.Text = Convert.ToString(results);
  </code></pre>