Search

산술3_개념01_몫과나머지

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

영상

개념

<script> /* [개념] 몫과 나머지 [1] 몫 구하는 방법 parseInt(정수 / 정수) [2] 나머지 구하는 방법 % */ console.log(10 / 3); console.log(parseInt(10 / 3)); // 정수로 변환 되면서 소수점이 전부 제거된다. document.write(10 / 3 + "<br>"); document.write(parseInt(10 / 3) + "<br>"); console.log(10 % 3); document.write(10 % 3 + "<br>"); </script>
Java
복사