// // Program to test "distance" function. // #include #include // "distance" function. // Post: Returns distance between a and b (i.e., absolute value of a-b). int distance(int a, int b) { return abs(a-b); } int main(void) { int a, b; cout << "Enter two integers:\n"; cin >> a >> b; cout << "Distance between " << a << " and " << b << " is " << distance(a,b) << endl; return EXIT_SUCCESS; }