title: Calculating Integer Percentage
body: <p>So I would like to calculate the percentage progress of my program as the nearest integer value</p>
  
  <p>In my examples lets take</p>
  
  <pre><code>int FilesProcessed = 42;
  int TotalFilesToProcess = 153;
  </code></pre>
  
  <p>So First I tried:</p>
  
  <pre><code>Int TotalProgress = ((FilesProcessed / TotalFilesToProcess) * 100)
  </code></pre>
  
  <p>This returned <code>TotalProgress = 0</code></p>
  
  <p>Then I tried</p>
  
  <pre><code>Int TotalProgress = (int)((FilesProcessed / TotalFilesToProcess) * 100)
  </code></pre>
  
  <p>This gives compiler error saying <code>Cannot implicitly convert type decimal to int</code></p>
  
  <p>Ive tried</p>
  
  <pre><code>Int TotalProgress = Math.Round((FilesProcessed / TotalFilesToProcess) * 100)
  </code></pre>
  
  <p>and get <code>The call is ambiguous between decimal and double</code></p>
  
  <p>and so now I've come here for help?</p>