#include#includevoid main(){int i,n,j;char a[100],t;printf("请输入字符串:\n");gets(a);n=strlen(a);for(j=0;jfor(i=0;iif(a[i]>a[i+1]){t=a[i];a[i]=a[i+1];a[i+1]=t;}printf("%d\n%s\n",n,a);}