解题思路:
注意事项:
参考代码:
#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语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:615 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:561 |
wu-理财计划 (C++代码)浏览:837 |
用筛法求之N内的素数。 (C语言代码)浏览:808 |
哥德巴赫曾猜测 (C语言代码)浏览:2352 |
【计算直线的交点数】 (C语言代码)浏览:1453 |
陈教主的三角形 (C语言代码)浏览:1143 |
敲七 (C++代码)浏览:1057 |
众数问题 (C语言代码)浏览:675 |
数列问题 (C语言代码)浏览:1022 |