View Code of Problem 3851

#include<cstdio>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#define N 100
using namespace std;
char str1[100]="qwertyuiopasdfghjklzxcvbnm";
char str2[100]="wertyuiop[sdfghjkl;xcvbnm,";
int main(){
    int t,i,j;
    scanf("%d",&t);
    while(t--)
	{
        char str[100],ans[100];
        int k=0;
        scanf("%s",str);
        for(i=0;i<strlen(str);i++)
		{
            for(j=0;j<26;j++)
			{
				if(str[i]==str2[j]){
					printf("%c",str1[j]);
				}
			}
        }      
        printf("\n");
    }
	return 0;
}

Double click to view unformatted code.


Back to problem 3851