1 개요[ | ]
- C언어 ceil()
- C Language ceil()
- 소수점 이하 올림 (Round up value)
- 헤더: math.h
정의
C
Copy
double ceil (double x);
2 예시[ | ]
C
Copy
#include <stdio.h>
#include <math.h>
int main()
{
printf("2.4 → %.1lf\n", ceil(2.4)); // 2.4 → 3.0
printf("3.7 → %.1lf\n", ceil(3.7)); // 3.7 → 4.0
return 0;
}
3 같이 보기[ | ]
편집자 John Jeong Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- C (7)
C, C++ 주석 ― YkhwongC, C++ 주석 ― John JeongC, C++ 주석 ― JmnoteC, C++ 주석 ― John JeongC언어 연결리스트 구현 ― 돌멩이C언어 연결리스트 구현 ― John JeongC언어 연결리스트 구현 ― 돌멩이