蓝桥杯基础练习VIP-字符串对比 (C++代码) 摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <algorithm> #include <iostream> #include <string> usin…… 题解列表 2019年03月01日 0 点赞 0 评论 1361 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比 (Java代码) 解题思路:这是一道简单的模拟题,先判断两个字符串的长度是否相等,再判断是否完全相同,然后再判断忽略大小写的情况下,两个字符串是否相同注意事项:参考代码:importjava.io.*;importjava.math.BigDecimal;importjava.math.BigInteger;impor 题解列表 2019年03月02日 0 点赞 0 评论 1163 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比-题解(C语言代码) #include#includeintmain(){inti;chars[10],s1[10];scanf("%s",s);scanf("%s",s1);if(strlen(s)!=strlen(s1)){printf("1\n");return0;}elseif(strcmp(s, 题解列表 2019年06月14日 0 点赞 0 评论 1007 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比-题解(C语言代码) 这个题目主要区分好条件,就很简单了,这个代码是比较通俗易懂,但是比较长,适合萌新。#include#includeintmain(){intn,m,i,flag1,flag2=0;charstr1[100],str2[100];//定义两个数组scanf("%s%s", 题解列表 2019年11月12日 0 点赞 0 评论 1116 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比-题解(C语言代码) 摘要:```c #include int main(){ char a[10],b[10]; scanf("%s %s",a,b); int n=strlen(a),m=strlen(b)…… 题解列表 2019年12月20日 0 点赞 0 评论 1423 浏览 评分:0.0
一位热心的老大爷-两种解法-字符串对比-题解(C语言代码) 思路1)对字符串s1、s2首先进行长度判断,若长度不等,直接判断为类型1;否则,继续判断2)用string.h库中strcmp判断两字符串是否相等,若返回值为0,判断为类型2;否则,继续判断下面判断有两种方法法1:编写子函数todown(char\*), 题解列表 2019年12月23日 0 点赞 0 评论 1126 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比 (Java代码) ##利用java中各种方法进行比较string.length();-----比较长度string.hashcode();---转换为hashcode比较大小写str1.toUpperCase().hashCode()---大小写不同先转换为统一的大写熟练掌握这些方法, 题解列表 2020年01月17日 0 点赞 0 评论 1042 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比-题解(C语言代码) 摘要:```c #include #include #include int main() { char a[100],b[100]; int i,j; scanf("%s%s",a…… 题解列表 2020年02月09日 0 点赞 0 评论 899 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比-题解(C语言代码) ```c#include#include#includeintmain(){chara[11],b[11];inti,len,type=0;//type作为标记,为1表示3,为0表示情况2scanf("%s",a);scanf("%s",b);if(strlen(a)!=strlen(b))//长度不 题解列表 2020年02月18日 0 点赞 0 评论 917 浏览 评分:0.0
蓝桥杯基础练习VIP-字符串对比-题解(C语言代码) 思路:1.接收两个字符串,对两个字符串的长度进行比较,如果不相同则输出1,否则对两个字符串进行比较,两个完全相同则输出2,再否则如果大小写匹配,输出3,上述情况都不符合则输出4.参考代码:```#include#includeintmain(){chara[15], 题解列表 2020年02月19日 0 点赞 1 评论 1152 浏览 评分:0.0