Search

산술1_개념06_소수점자리수

대분류
STEP01 프로그램설치/기초/산술/변수
문제 난이도
필수
소분류
산술1_개념

영상

개념

<script> /* [개념] 소수점 자리수 제어 값.toFixed(자리수); 소수점 자리수를 자르고 반올림해준다. */ console.log(3.1353453453); console.log(3.1353453453.toFixed(2)); console.log(3.1.toFixed(2)); document.write(3.1353453453 + "<br>"); // 3.1353453453 document.write(3.1353453453.toFixed(2) + "<br>"); // 3.14 document.write(3.1.toFixed(2) + "<br>"); // 3.10 </script>
Java
복사