abs() 是用来求整型表达式的绝对值
fabs() 是用来求浮点型表达式的绝对值
#include<math.h>
int型
int abs(int x);
long 型
long labs(int x);
浮点数 float double
double fabs(double x);
abs() 是用来求整型表达式的绝对值
fabs() 是用来求浮点型表达式的绝对值
#include<math.h>
int型
int abs(int x);
long 型
long labs(int x);
浮点数 float double
double fabs(double x);