double fabs(double x);
Paramter:
x: tham số đầu vào double
Remark:
Hàm fabs( ) trả về giá trị tuyệt đối của x.
Ví dụ:
#include <math.h> #include <conio.h> #include <stdio.h> void main( void ) { double y; y = fabs(-9.5); printf("\nAbsolute value of -9.5 is: %.2f", y); getch(); }
Kết quả:
Leave a Reply
You must be logged in to post a comment.