본문 바로가기
TIL (Today I Learned)

TIL) 자바의 정석 기초편 chapter 3 연습문제 - 연산자

by Won's log 2023. 7. 27.

 

자바의 정석 기초편 chapter3 연산자에서 연습문제를 풀었다.

그중에 틀린 문제를 풀이와 함께 TIL로 정리해보았다.

두 문제를 틀린 이유는 나눗셈연산자, 정수간의 나눗셈 연산은는 반올림을 하지 않고 버림을 한다는 것을 몰랐기 때문이다.

보다 효율적으로 코드를 짤 수 있음을 알게 되었다.

 

출처 :  자바의 정석 저자 '남궁성'님의 깃 허브

https://github.com/castello/javajungsuk3 

 

GitHub - castello/javajungsuk3: soure codes and ppt files of javajungsuk 3rd edition

soure codes and ppt files of javajungsuk 3rd edition - GitHub - castello/javajungsuk3: soure codes and ppt files of javajungsuk 3rd edition

github.com