double ceil(double x);
Parameter:
X: giá trị double
Remark:
Hàm ceil( ) trả về giá trị nguyên nhỏ nhất, lớn hơn hoặc bằng x
Ví dụ:
#include <math.h> #include <stdio.h> #include <conio.h> int main( void ) { double question = 45.35, answer; answer = ceil( question ); printf("\nceil(%.3f) = %.2f", question, answer); getch(); }
Kết quả:
Leave a Reply
You must be logged in to post a comment.