Hi I want to divide 1 by 12 and multiply the answer with another integer. But when I do int factor = 1/12; it returns zero, is it because of rounding? please help me fix this!
rob1998@ http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html To make it work cast the int to float when dividing. Code: float f=((float)someInt)/12f;