题解 | #图片整理#
图片整理
https://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941
#include <stdio.h>
#include <string.h>
int main() {
int a, b,len,temp;
char str[1000];
while (scanf("%s", str) != EOF) {
len = strlen(str);
for(int i =0;i<len-1;i++){
for(int j=0;j<len-1-i;j++){
if(str[j]>str[j+1]){
temp = str[j];
str[j] = str[j+1];
str[j+1] = temp;
}
}
}
printf("%s", str);
}
return 0;
}

查看13道真题和解析