题解 | 图片整理
图片整理
https://www.nowcoder.com/practice/2de4127fda5e46858aa85d254af43941
#include <stdio.h>
#include <string.h>
int main() {
int len;
char str[1000],c;
while (scanf("%s", str) != EOF) {
len = strlen(str);
for(int i = 0;i < len;i++)
{
for(int j = i + 1;j < len;j++)
{
if((int)str[i] > (int)str[j])
{
c = str[i];
str[i] = str[j];
str[j] = c;
}
}
printf("%c", str[i]);
}
}
return 0;
}
深信服公司福利 811人发布

