#include <stdio.h>
#include <string.h>
#define SIZE 3
#define LEN 81
int main(void)
{
char ch[SIZE][LEN];
char* temp[SIZE];
char* pch;
int i,j;
for (i = 0; i < SIZE; i++)
{
gets(ch[i]);
temp[i] = ch[i];
}
for (i = 0; i < SIZE - 1; i++)
{
for (j = i + 1; j < SIZE; j++)
{
if (strcmp(ch[i], ch[j]) > 0)
{
pch = temp[i];
temp[i] = temp[j];
temp[j] = pch;
}
}
}
for (i = 0; i < SIZE; i++)
puts(temp[i]);
return 0;
}
0.0分
1 人评分