Return absolute value of integer parameter: how to use abs
#include <stdio.h> #include <math.h> int main () { int n, m; n = abs( 3 ); m = abs( -1 ); printf (" n = %d \n", n); printf (" m = %d\n", m); return 0; }