View Code of Problem 3851

#include<stdio.h>
#include<string.h>
int main(){
	int k;
	scanf("%d",&k);
	char a[100]="qwertyuiopasdfghjklzxcvbnm";
	char b[100]="wertyuiop[sdfghjkl;xcvbnm,";
	getchar();
	while(k-->0){
		char c[100];
		scanf("%s",c);
		int len=strlen(c);
		for(int i=0;i<len;i++){
			for(int j=0;j<26;j++){
				if(c[i]==b[j]){
					printf("%c",a[j]);
				}
			}
		}
		printf("\n");
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3851