冒泡排序思想,直接比较大小 摘要:解题思路:使用冒泡排序思想,直接用strcmp()函数比较字符串大小即可参考代码:#include<stdio.h> #include<string.h> int main(){ char a…… 题解列表 2024年03月06日 0 点赞 0 评论 424 浏览 评分:0.0
小白随便写的,记录一下 ```pythona=input()b=input()c=input()word=[a,b,c]word.sort()#sort函数可以对数字排序也可以对字符串排序默认以字符串在单词表的位置进行排序也可以以长度对字符串排序word.sort(key=len)需要传入一个函数每次排序前会对列表中的元素做 题解列表 2024年03月24日 0 点赞 0 评论 923 浏览 评分:0.0
字符串排序 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,j,a[3][100],t[100]; for(i=0;i<3;…… 题解列表 2024年04月04日 0 点赞 0 评论 540 浏览 评分:0.0
1044 三个字符串的排序(for循环交换) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<stdlib.h>int main(){ char a[4][100]; for(…… 题解列表 2024年05月20日 1 点赞 0 评论 438 浏览 评分:0.0
傻瓜式解决方法 #include#include//(类比依次输出数字的大小,采用中间变量进行排序)intmain(){charstr1[100],str2[100],str3[100];//读取三个字符串scanf("%99s",str1);//限制输入长度, 题解列表 2024年06月17日 0 点赞 0 评论 614 浏览 评分:0.0
c++的compare就是c的strcmp 摘要:#include<bits/stdc++.h> using namespace std; int main() { string s[3]; cin>>s[0]>>s[1]>…… 题解列表 2024年07月30日 0 点赞 0 评论 502 浏览 评分:0.0
编写题解 1044: [编程入门]三个字符串的排序 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>void fun(char a[3][100]) { char temp[100]; …… 题解列表 2024年09月21日 0 点赞 0 评论 498 浏览 评分:0.0
1044: [编程入门]三个字符串的排序(详细解答) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main() { char a[3][1000]; // 定义一个二维字符数组来存…… 题解列表 2024年11月09日 1 点赞 0 评论 803 浏览 评分:0.0
关键词:指针、数组和函数之间地址的传递 摘要:参考代码:#include <stdio.h> #include <math.h> #include <string.h> void sort(char **p,int n) //用于排序的…… 题解列表 2024年11月20日 2 点赞 0 评论 622 浏览 评分:0.0
1044 : 三个字符串的排序 摘要:#include <stdio.h> #include <string.h> int main() { char a[1000],b[1000],c[1000]; …… 题解列表 2024年12月15日 1 点赞 0 评论 1224 浏览 评分:0.0