最普通的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int strcmp_(char a[],char b[]){ int len1,len2; …… 题解列表 2024年12月27日 0 点赞 0 评论 410 浏览 评分:0.0
蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ char b[101],a[101]; scanf("%s …… 题解列表 2024年12月21日 0 点赞 0 评论 428 浏览 评分:0.0
简单易懂(c语言代码) 摘要:```c #include #include #define max(a,b) (a>b?a:b) // 宏定义,返回两个值中的较大者 #define MAX 101 …… 题解列表 2024年08月25日 1 点赞 0 评论 519 浏览 评分:0.0
1646: 蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:库里有strcmp函数,返回的就是第一个不一样的位置成功返回0注意事项:参考代码: #include<iostream> #include<string> #include…… 题解列表 2024年05月22日 0 点赞 0 评论 459 浏览 评分:0.0
蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:先算俩字符串字符个数,记为am,bm;再分俩种情况讨论(am=bm和am!=bm)注意事项:参考代码:#include<stdio.h>#include<string.h>// 是 C 语言…… 题解列表 2024年02月07日 0 点赞 0 评论 443 浏览 评分:0.0
比较字符串(嘿嘿,这题嘛,其实可以输出strcmp的返回值的,返回值就是字典序差) 摘要:解题思路: 怎么说,是不是很方便 参考代码: ```c #include #include int main() { char s1[101],s2[101]; scanf("%…… 题解列表 2023年12月21日 0 点赞 0 评论 506 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str1[101], str2[101]; scanf…… 题解列表 2023年07月03日 0 点赞 0 评论 823 浏览 评分:0.0
比较字符串(C语言) 摘要:#include<stdio.h> #include<string.h> int main() { char s1[100], s2[100]; char* p1 = s1, * p2 …… 题解列表 2023年01月06日 0 点赞 0 评论 491 浏览 评分:0.0
1646: 蓝桥杯算法训练VIP-比较字符串(C语言)(和1516题目相对应) 摘要:#### 解题思路: 1. 先判断字符串是否相等,用“strcmp”判断相等输出“0” 2. 对不相等时每个字符进行判断,用“for”循环进行每个字符判断 #### 相关代码 #i…… 题解列表 2022年03月08日 0 点赞 0 评论 623 浏览 评分:9.9
此方法翁恺也在用 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int mystrcmp(char* p, char* q);int main(){ char str1[100], str2[100]…… 题解列表 2021年03月20日 0 点赞 0 评论 667 浏览 评分:9.9