与数学相比,计算机中的商和余数计算是否有所不同[重复]

class FIRST
{
    public static void main()
    {
       float f1 = 8/10;
       System.out.println(f1);

    }
}
output: 0.0 in case of f1 type float
output: 0 in case of f1 type int
but when I am doing this on a calculator , the answer is coming  0.8
I am confused.Is there quotient and remainder calculation different in computer as compare with math.

但是当我使用在线计算器做8/10时,它给出了余数8和商0.online计算器给出了商和余数的正确答案。