본문 바로가기

C++문법

소수점 제거 함수 삼총사 ceil(), floor(), round()

ceil() : 소수점 버리고, +1한다.

floor() : 소수점만 버린다.

round() : 반올림