인프런 커뮤니티 질문&답변
답변 1
0
나도코딩
지식공유자
우선 코드 맨 위에 아래 두 줄을 적어서 math.h 를 포함시키구요,
#define _USE_MATH_DEFINES // for C #include <math.h>
아래 함수를 사용해보시겠어요?
1) ceil(올림)
ceil(2.3) -> 3
ceil(2.8) -> 3
2) floor(내림)
floor(2.3) -> 2
floor(2.8) -> 2
3) round(반올림)
round(2.3) -> 2
round(2.8) -> 3





