解题思路:
注意事项:
参考代码:
#include<iostream>
#include<string>
#include<algorithm>
#include<string>
#include <ctype.h>
using namespace std;
int main(){
string s1, s2;
cin>>s1>>s2;
if(s1.length() != s2.length())
cout<<1<<endl;
else if(s1 == s2){
cout<<2<<endl;
}else{
for(int i=0; i<s1.length(); i++){
s1[i] = tolower(s1[i]);
s2[i] = tolower(s2[i]);
}
if(s1 == s2)
cout<<3<<endl;
else
cout<<4<<endl;
}
return 0;
}
0.0分
0 人评分
【亲和数】 (C语言代码)浏览:542 |
字符串对比 (C语言代码)浏览:1413 |
C语言程序设计教程(第三版)课后习题6.5 (C语言代码)浏览:760 |
A+B for Input-Output Practice (III) (C语言代码)浏览:576 |
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)浏览:2081 |
C语言程序设计教程(第三版)课后习题9.10 (C语言代码)浏览:836 |
图形输出 (C语言代码)浏览:1387 |
用筛法求之N内的素数。 (C语言代码)浏览:533 |
数列问题 (C语言代码)浏览:1022 |
小O的乘积 (C语言代码)浏览:1015 |