View Code of Problem 3851

#include<iostream>
#include<cstring>
#include<cmath>
#include<string>
using namespace std;
string zm="qwertyuiop[asdfghjkl;zxcvbnm,";
int main()
{
    int n;
    cin>>n;
    while(n--)
    {
    	string s;
    	cin>>s;
    	int len=s.size();
    	
    	for(int i=0;i<len;i++)
    	{
    		for(int j=0;j<29;j++)
    		{
    			if(s[i]==zm[j])
    			{
    				cout<<zm[j-1];
    				break;
				}
			}
		}
		cout<<endl;
	}
}

Double click to view unformatted code.


Back to problem 3851