题解 | #实现四舍五入#
实现四舍五入
http://www.nowcoder.com/practice/020a0cf673174d5795d97ae79cff59a0
题解: 直接使用Math.round
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
float c = sc.nextFloat();
System.out.println(Math.round(c));
}
}