C# easy math function
<p>I`m trying to calculate a percent of successful jobs in total.
Code:</p>

<pre><code>int total = valid + invalid;
int percent = (valid / total) * 100;
if (percent == 0)
{
  MessageBox.Show(Convert.ToString(total) + ":" + Convert.ToString(valid));
  break;
}
</code></pre>

<p>If all job are successful, the percent is 100%.
If one job is bad, percent is 0 and i get messagebox with:
9:8</p>

<p>8/9*100 = 88.888, not 0. </p>

<pre><code>int percent = Convert.ToInt32((valid / total) * 100);
</code></pre>

<p>gives no result. Please, help me.
I am Russian, so sorry for bad English.</p>
