View Code of Problem 3851

#include<bits/stdc++.h>
using namespace std;
int T;
int main() {
	string Ele = "qwertyuiop[asdfghjkl;zxcvbnm,";
	cin >> T;
	while (T--) {
		string s;
		cin >> s;
		for (int i = 0; i < s.length(); i++) {
			for (int j = 0; j < Ele.length(); j++) {
				if (s[i] == Ele[j])
					cout << Ele[j - 1];
			}
		}
		cout << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3851