以下是引用laoyang103在2011-9-5 18:42:20的发言:
#include
int base[26] = {'Z','A','B','C','D','E','F','G','H','I','J',//1-10
'K','L','M','N','O','P','Q','R','S','T',//11-20
'U','V','W','X','Y'};//21-26
int main()
{
int i,j;
int n;
while(EOF != scanf("%d",&n))
{
int k = 0;
int bit[100] = {0};
while(n)
{
bit[k++] = n%26;
n /= 26;
}
while(k--)
{
putchar(base]);
}
printf("\n");
}
return 0;
}我直接用Z来代替0了 输入26输出AZ表示向前面进了一位
没仔细看代码哦,输入26应该只输出Z的