#!/usr/bin/env cscript #include <stdio.h> #include <string.h> #define ALPHABET "ABCDEFGHIJKLMNOPQRSTUVWXYZA" int main(int argc, char *argv[]) { int value, needle; char column_index[3 + 1]; for (needle = 0, value = 1; value > 0; value = value / strlen(ALPHABET), needle++) { column_index[needle] = ALPHABET[(value - 1) % strlen(ALPHABET)]; } printf("[%s]\n", column_index); }