当前位置:首页 » 编程语言 » c语言az排序顺序
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

c语言az排序顺序

发布时间: 2023-08-01 14:58:52

❶ 蓝桥杯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]);
}
}