/*--------------------------------------------------------------------*/ /* absval.c */ /* Author: Bob Dondero */ /*--------------------------------------------------------------------*/ #include #include /*--------------------------------------------------------------------*/ static int iInput; static int iAbsVal; /*--------------------------------------------------------------------*/ /* Read an integer from stdin, and write its absolute value to stdout. Return 0. */ int main(void) { printf("Enter an integer: "); scanf("%d", &iInput); iAbsVal = abs(iInput); printf("The integer's absolute value is %d.\n", iAbsVal); return 0; }