View Code of Problem 3851

#include<stdio.h>
#include<math.h>
int main(){
	char R[50]={"qwertyuiopasdfghjklzxcvbnm"};
	char W[50]={"wertyuiop[sdfghjkl;xcvbnm,"};
	char S1[100];
	int T,i,j,len;
	scanf("%d",&T);
	while(T--){
		scanf("%s",S1);
		len=strlen(S1);
		for(i=0;i<len;i++){
			for(j=0;j<26;j++){
				if(S1[i]==W[j])
				printf("%c",R[j]);
			}
		}
		printf("\n");
		
	}
}

Double click to view unformatted code.


Back to problem 3851