#include <stdio.h>
#include <string.h>
void fun( char t
[] )
{
char c
;
int i
, j
;
for( i
= strlen( t
)-1; i
>0; i
-- )
for( j
= 0; j
< i
; j
++ )
if( t
[j
] >t
[ j
+ 1 ] )
{
c
= t
[j
];
t
[j
] = t
[ j
+ 1 ];
t
[j
+ 1 ] = c
;
}
}
int main()
{char s
[100];
gets(s
);
fun(s
);
puts(s
);
}
转载请注明原文地址: https://lol.8miu.com/read-1576.html