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