#include stdio.h#include math.hint main () {int a, b;a = 1234;b = -344;printf(The absolute value of %d is %lf\\n, a, fabs(a));
编程学习网为您整理以下代码实例,主要实现:C语言库fabs()函数,希望可以帮到各位朋友。
#include <stdio.h>
#include <math.h>
int main () {
int a, b;
a = 1234;
b = -344;
printf("The absolute value of %d is %lf\n", a, fabs(a));
printf("The absolute value of %d is %lf\n", b, fabs(b));
return(0);
}