题目1054:字符串内排序-------

#include<stdio.h> 
#include<cstring>
#include<algorithm>
using namespace std; 
int main()
{
    char *a=(char *)malloc(sizeof(char));
    while(scanf("%s",a)!=EOF)
    {
        int len=strlen(a);
        sort(a,a+len);
        printf("%s
",a);
    }
    return 0;
}
#include<stdio.h> 
#include<cstring>
#include<algorithm>
using namespace std; 
char  a[202];

int main()
{
    
    while(scanf("%s",a)!=EOF)
    {
        int len=strlen(a);
        sort(a,a+len);
        printf("%s
",a);
    }
    return 0;
}
原文地址:https://www.cnblogs.com/jianrenguo/p/6553632.html