View Code of Problem 3851

#include<bits/stdc++.h>
using namespace std;
string a= "qwertyuiop[asdfghjkl;zxcvbnm,", b;
int main()
{
	int t;
	cin >> t;
	while(t--)
	{
		cin >> b;
		int len = b.size();
		for(int i = 0; i < len; i++)
		{
//			if(b[i] == 'q' || b[i] == 'a' || b[i] == 'z')
//				cout << b[i];
		
			{
				for(int j = 0; j < a.size(); j++)
				{
					if(b[i] == a[j])
						cout << a[j - 1];
				}
			}
		}
		cout << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3851