解题思路:
注意事项:
参考代码:
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int main()
{
char a[80],b[80],c[80],t[80];
gets(a);gets(b);gets(c);
if(strcmp(a,b)>0)
{
strcpy(t,a);strcpy(a,b);strcpy(b,t);
}
if(strcmp(a,c)>0)
{
strcpy(t,a);strcpy(a,c);strcpy(c,t);
}
if(strcmp(b,c)>0)
{
strcpy(t,b);strcpy(b,c);strcpy(c,t);
}
puts(a);puts(b);puts(c);
return 0;
}
0.0分
0 人评分