int a=4;int b=3;float c = (float) a/b;System.out.print(c);//输出:1如果要的到精确的结果,要用下面的方法int a=4;int b=3;float c = (float) a/(float) b;System.out.print(c);//输出:1.3333334 相关文章: 2021-05-24 2021-06-14 2022-12-23 2021-12-07 2022-12-23 2022-01-01 2021-06-21 2022-12-23