title: percentage of two int?
body: <p>I want to get two ints, one divided by the other to get a decimal or percentage.
  How can I get a percentage or decimal of these two ints?
  (I'm not sure if it is right.. I'm probably way off...)
  for example:</p>
  
  <pre><code>int correct = 25;
  int questionNum = 100;
  float percent = correct/questionNum *100;
  </code></pre>
  
  <p>This is how I thought I could do it, but it didn't work... I want to make the decimal (if there is one) into a percent out of 100 for example in this case it is %25. any ideas anyone?</p>
  
  <p>Here is the correct code (thanks to Salvatore Previti!):</p>
  
  <pre><code>float correct = 25;
  float questionNum = 100;
  float percent = (correct * 100.0f) / questionNum;
  </code></pre>
  
  <p>(btw, I am making a project using this for a quiz checking program that is why I need the percentage or decimal)</p>