View Code of Problem 3851

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
    int T;
    cin>>T;
    while(T--){
        string str="qwertyuiop[asdfghjkl;zxcvbnm,";
        char s[999];
        cin>>s;
        for(int i=0;i<strlen(s);i++){
            for(int j=0;j<str.length();j++){
                if(s[i]==str[j])
                    cout<<str[j-1];
            }
        }
        cout<<endl;
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 3851