#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void inOrder(char array[], int n );
int main(int argc, char *argv[])
{
char
temp[100];
printf("请输入字符串:\n");
gets(temp);
char
a[strlen(temp)+1];
strcpy(a,temp);
inOrder(a,strlen(temp));
int k;
for(k=0;
k<strlen(temp); k++)
{
printf("%c",a[k]);
}
system("pause");
return
0;
}
//选择法排序函数
void inOrder(char array[], int n)
{
int i,
j;
char temp;
for(i=0;
i<n-1; i++)
{
for(j=i+1; j<n; j++)
{
if(array[j]>array[i])
{
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
}
}
#include <stdlib.h>
#include <string.h>
void inOrder(char array[], int n );
int main(int argc, char *argv[])
{
}
//选择法排序函数
void inOrder(char array[], int n)
{
}