Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- char a[100],b[100],c[100],d[100],e[100];
- int t,i,j,k,l;
- cin>>t;
- for(l=1;l<=t;l++)
- {
- scanf("%s %s",a,b);
- if(strcmp(a,b)==0){
- cout<<"Case "<<l<<": "<<"Login successful."<<endl;
- continue;
- }
- for(i=0;i<strlen(a);i++)
- {
- if(a[i]>=65 && a[i]<=90)
- c[i]=a[i]+32;
- else if(a[i]>=97 && a[i]<=122)
- c[i]=a[i]-32;
- }
- if(strcmp(c,b)==0){
- cout<<"Case "<<l<<": "<<"Wrong password. Please, check your caps lock key."<<endl;
- continue;}
- for(i=0;i<strlen(a);i++)
- {
- if(a[i]>='0' && a[i]<='9')
- continue;
- else
- d[i]=a[i];
- }
- if(strcmp(d,b)==0){
- cout<<"Case "<<l<<": "<<"Wrong password. Please, check your num lock key."<<endl;
- continue;}
- for(i=0;i<strlen(a);i++)
- {
- if(a[i]>=65 && a[i]<=90)
- e[i]=a[i]+32;
- else if(a[i]>=97 && a[i]<=122)
- e[i]=a[i]-32;
- else if(a[i]>='0' && a[i]<='9')
- continue;
- else
- e[i]=a[i];
- }
- if(strcmp(e,b)==0){
- cout<<"Case "<<l<<": "<<"Wrong password. Please, check your caps lock and num lock keys."<<endl;
- continue;}
- else
- cout<<"Case "<<l<<": "<<"Wrong password."<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement