#include<stdio.h> #include<string.h> #define N 80 int main() { int i, j; char str[4][N], s[N]; gets(str[0]); gets(str[1]); gets(str[2]); for(i=0; i<3; i++) for(j = i+1; j<3; j++) if(strcmp(str[i], str[j]) > 0) { strcpy(s, str[i]); strcpy(str[i], str[j]); strcpy(str[j], s); } for(i=0; i<3; i++) printf("%s\n", str[i]); return 0; }
0.0分
0 人评分
逆反的01串 (C++代码)(依旧推荐switch)浏览:876 |
C语言训练-邮票组合问题* (C语言代码)......浏览:599 |
2006年春浙江省计算机等级考试二级C 编程题(2) (C语言代码)浏览:415 |
A+B for Input-Output Practice (VII) (C++代码)浏览:561 |
C语言训练-求1+2!+3!+...+N!的和 (C语言代码)浏览:725 |
C语言程序设计教程(第三版)课后习题10.4 (C语言代码)浏览:850 |
a+b浏览:419 |
1017题解浏览:532 |
核桃的数量 (C语言代码)浏览:639 |
简单的a+b (C语言代码)浏览:380 |