|You need to learn how to use a debugger to find your problem. It will allow you to step through your code, one line at a time, to find out where it's doing something unexpected.
I will point out, however, that you can map a
char to a range that starts at
0 like this:
t = eng - 'A';
'Z' have contiguous values, so this maps
25, assuming that it was an uppercase letter. You can check for invalid input with
if((t < 0) || (t > 14))...
Similarly, you can write
cout << ' ' << i + 'A';