题目地址:http://ac.jobdu.com/problem.php?cid=1040&pid=4
C语言源码:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
int cmp(const void *a,const void *b)
{
return (*(char *)a-*(char *)b);
}
int main()
{
char s[201];
int n;
while(gets(s))
{
n=(int)strlen(s);
qsort(s,n,sizeof(s[0]),cmp);
puts(s);
}
}