나머지연산자 Java15 Math.round() // Math.round() // 실수를 소수첫째자리에서 반올림한 정수를 반환 long result = Math.round(4.52); //반올림되서 5 long result2 = Math.round(4.32); //반올림 안되니까 4 System.out.println(result); System.out.println(result2); //나머지 연산자 % 피연산자로 정수만 허용 2. 부호는... 반올림Math.round나머지연산자Math.round
Java15 Math.round() // Math.round() // 실수를 소수첫째자리에서 반올림한 정수를 반환 long result = Math.round(4.52); //반올림되서 5 long result2 = Math.round(4.32); //반올림 안되니까 4 System.out.println(result); System.out.println(result2); //나머지 연산자 % 피연산자로 정수만 허용 2. 부호는... 반올림Math.round나머지연산자Math.round