📜  c语言中的abs函数-任何代码示例

📅  最后修改于: 2022-03-11 14:56:37.936000             🧑  作者: Mango

代码示例1
//abs is function which returns absolute value of a integer 
#include 
#include 
int main()
{
   int m = abs(34);     // m is assigned to 200
   int n = abs(-40);    // n is assigned to -400
 
   printf("Absolute value of m = %d\n", m);
   printf("Absolute value of n = %d \n",n);
   return 0;
}