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