The closest in between

#include <stdio.h>

// Function to calculate the absolute difference between two numbers
int absoluteDifference(int a, int b) {
    return (a > b) ? (a - b) : (b - a);
}

int main() {
    // Declare variables
    int num1, num2;

    // Input first number
    printf("Enter the first number: ");
    scanf("%d", &num1);

    // Input second number
    printf("Enter the second number: ");
    scanf("%d", &num2);

    // Calculate and display the absolute difference
    printf("The absolute difference between %d and %d is: %d\n", num1, num2, absoluteDifference(num1, num2));

    return 0;
}