#include <stdio.h>

#ifndef USE_ALT

int main(void) {
    int a, b, c;

    printf("Int A: ");
    scanf("%d", &a);
    printf("Int B: ");
    scanf("%d", &b);
    printf("Int C: ");
    scanf("%d", &c);

    if (a == b && a == c) {
        printf("All three values are equal.\n");
    } else if (a != b && a == c) {
        printf("Two values are equal.\n");
    } else if (a != c && a == b) {
        printf("Two values are equal.\n");
    } else if (b == c) {
        printf("Two values are equal.\n");
    } else {
        printf("All three values are different.\n");
    }

    return 0;
}

#endif // !(defined(USE_ALT))

#ifdef USE_ALT

#define NON_EQUAL 0
#define ONE_EQUAL 1
#define ALL_EQUAL 2

// alternetive answer
int main(void) {
    int flag = 0; // remember, boolean in C is just integer

    int a, b, c;

    printf("Int A: ");
    scanf("%d", &a);
    printf("Int B: ");
    scanf("%d", &b);
    printf("Int C: ");
    scanf("%d", &c);

    flag += a == b;
    flag += a == c;

    if (flag != ALL_EQUAL) {
        flag += b == c;
    }

    if (flag == NON_EQUAL) {
        printf("All three values are different.\n");
    } else if (flag == ONE_EQUAL) {
        printf("Two values are equal.\n");
    } else {
        printf("All three values are equal.\n");
    }

    return 0;
}

#endif // defined(USE_ALT)
