更新时间:2023-09-04 14:39:10
使用 String.format
将您的输出格式化为 3 个小数位.输出四舍五入.
Use String.format
to format your output to 3 decimal places. The output is rounded.
System.out.println("Your average for the game or season is: " +
String.format("%.3f", avg));