I need to convert an int variable to double
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3144610/java-integer-division-how-do-you-produce-a-double">Java Integer division: How do you produce a double?</a>  </p>
</blockquote>



<p>My friend is trying to make some kind of calculation as a task for class, and he's having some trouble... I hope you can help him.</p>

<p>The problem is that he gets an input from the user as int (it has to be, it's a part of the task). He is trying to convert it to double in the code below, but this doesn't work. The results are int anyway.</p>

<pre><code>double firstSolution = ((b1 * a22 - b2 * a12) / (a11 * a22 - a12 * a21));
double secondSolution = ((b2 * a11 - b1 * a21) / (a11 * a22 - a12 * a21));
</code></pre>

<p>If you need more explanation, I'll ask him for it. Thanks in advance!</p>
