柏舟泛流


私信TA

用户名:1526784975

访问量:5850

签 名:

等  级
排  名 877
经  验 3520
参赛次数 0
文章发表 14
年  龄 0
在职情况 学生
学  校
专  业

  自我简介:

解题思路:

注意事项:

参考代码:#include<stdio.h>
#include<string.h>
int main()
{
 char a[100],b[100],c[100],t[100];
 gets(a);
 gets(b);
 gets(c);
 if(strcmp(a,b)>0)
 {
  strcpy(t,b);
  strcpy(b,a);
  strcpy(a,t);
 }
 if(strcmp(a,c)>0)
 {
  strcpy(t,c);
  strcpy(c,a);
  strcpy(a,t);
 }
 if(strcmp(b,c)>0)
 {
  strcpy(t,c);
  strcpy(c,b);
  strcpy(b,t);
 }
 puts(a);
 puts(b);
 puts(c);
 return 0;
}

 

0.0分

0 人评分

  评论区

  • «
  • »