?
?
#include<bits/stdc++.h>
using namespace std;
int judge1(char *s1,char *s2){
if(strlen(s1)!=strlen(s2)){
return 1;
}
else{
return 0;
}
}
int judge2(char *s1,char *s2){
int i=0;
if(strlen(s1)==strlen(s2)){
while(s1[i]!='\0'){
if(s1[i]==s2[i]){
i++;
if(s1[i]=='\0'){
return 2;
break;
}
}
else{
return 0;
}
}
}
else{
return 0;
}
}
int judge3(char *s1,char *s2){
int i=0;
if(strlen(s1)==strlen(s2)){
while(s1[i]!='\0'){
if(s1[i]==s2[i]||(s1[i]+32)==s2[i]||(s1[i]-32)==s2[i]){
i++;
if(s1[i]=='\0'){
return 3;
break;
}
}
else{
return 0;
}
}
}
else{
return 0;
}
}
int main(){
char s1[11]="\0";
char s2[11]="\0";
cin>>s1;
cin>>s2;
if(judge1(s1,s2)==1){
cout<<1;
}
else if(judge2(s1,s2)==2){
cout<<2;
}
else if(judge3(s1,s2)==3){
cout<<3;
}
else{
cout<<4;
}
return 0;
}
|