To make it portable I would just do this



char letters(int r) {
switch(r) {
case 10: return 'A';
case 11: return 'B';
case 12: return 'C';
/*...*/