#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>

int strcasecmp(const char* s1, const char* s2) {
    int i = 0;
    char c1, c2;
    while (s1[i] != 0 && s2[i] != 0)
    {
        c1 = tolower(s1[i]);
        c2 = tolower(s2[i]);
        if (c1 != c2)
            return s1[i] - s2[i];
        i++;
    }
    return s1[i] - s2[i];
}

int main(int argc, char* argv[])
{
    if (argc < 3)
        perror("not enough args");

    printf("%d\n", strcasecmp(argv[1], argv[2]));
}
