I am new to Java.. and am trying to make a very simple program that divides two numbers. I am getting the result as 0.00 ... why is that?
package in.trackwealth;
public class PercentageCalculator
{
public static void main(String []args)
{
int sum = 412;
float res;
res = (sum/480);
System.out.printf("%.2f", res);
}
}
Where am I going wrong?