题解 1044: [编程入门]三个字符串的排序

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

傻瓜式解决方法

#include#include//(类比依次输出数字的大小,采用中间变量进行排序)intmain(){charstr1[100],str2[100],str3[100];//读取三个字符串scanf("%99s",str1);//限制输入长度,

字符串排序

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,j,a[3][100],t[100]; for(i=0;i<3;……

冒泡排序思想,直接比较大小

摘要:解题思路:使用冒泡排序思想,直接用strcmp()函数比较字符串大小即可参考代码:#include<stdio.h> #include<string.h> int main(){ char a……

暴力求解———C语言

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char a[3][30],b[30],c[30]; int i; fo……

不能没落的strcmp和strcpy!!!

解题思路:strcmp函数:若返回值为0,说明两个字符串相等。若返回值小于0,说明str1小于str2。若返回值大于0,说明str1大于str2。作用:用于比较两个字符串。函数原型:intstrcmp(constchar*str1,constchar*str2);返回值:返回一个整数,表示比较的结果。

有瑕疵请指出

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char ch[3][1000],b[1000]; int i; for(i……