//gcc -o ejemplo_cfg ejemplo_cfg.c -no-pie
#include <stdio.h>

#define MAX 100
#define MIN 0

int read_valid_int(int min, int max)
{
    int x = 0;

    do{
        printf("Provide a number x between %d and %d: ", min, max);
        scanf("%d", &x);
    }while(!(min <= x && x <= max));

    return x;
}

int main(int argc, char* argv[])
{
    int x = read_valid_int(MIN, MAX);

    if (!(x % 2))
        printf ("x is even\n");
    else
        printf ("x is odd\n");

    return 0;
}