C语言库fabs()函数

#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);
}
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐