#define ABS(x) x * (((2 * x) + 1) % 2)
#define MAX(x, y) ((x+y) + ABS(x-y))/2
#define TWO 2
#define THREE 3
#define ZERO 0


// Part 2 exercise 2
void main(void)
{
    short x_king,
          y_king,
          x_zariah,
          y_zariah,
          answer;

    // If answer == '0' is TRUE, else is FALSE
    if ((x_king - x_zariah) * (y_king - y_zariah) == ZERO){}
}

// Part 2 exercise 3
void main(void)
{
    short x_king,
          y_king,
          x_runner,
          y_runner,
          answer;

    // If answer == '0' is TRUE, else is FALSE
    if (ABS(x_king - x_runner) - ABS(y_king - y_runner) == ZERO){}
}

// Part 2 exercise 4
void main(void)
{
    short x_king,
          y_king,
          x_horseman,
          y_horseman,
          answer;

    // If answer == '0' is TRUE, else is FALSE
    if (ABS(x_king - x_horseman) + ABS(y_king - y_horseman) - THREE == ZERO){}
}

// Part 2 exercise 5
void main(void)
{
    short a,
          b,
          answer;

    answer = ((a+b) + ABS(a-b))/TWO;
}
