C语言编程入门教程 - abs 函数是用来求整数的绝对值的。
//函数名:abs //功 能:求整数的绝对值 //用 法:int abs(int i); //程序例: #include<stdio.h> #include<math.h> int main(void) { int number = -1234; printf("number: %d absolute value: %d ", number, abs(number)); return 0; }