❶ 蓝桥杯C语言题目
#include<stdio.h>
int main(){
char code[]={'Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y'};
char num[10];
int sgln=0,sang,yu,len=0;
sang=2019/26;
yu=2019%26;
num[len]=code[yu];
len++;
while(sang!=0){
if(sang!=0&&yu==0)
yu=(sang-1)%26;
else
yu=sang%26;
sang=sang/26;
num[len]=code[yu];
len++;
}
len--;
for(;len>=0;len--){
printf("%c",num[len]);
}
}