View Code of Problem 3851

#include<stdio.h>
#include<string.h>
#include<math.h>

int main(){
	char str[3][11]={
	{'q','w','e','r','t','y','u','i','o','p','[',},
	{'a','s','d','f','g','h','j','k','l',';'},
	{'z','x','c','v','b','n','m',','}	
	};
	char a[100];
	int i,j,k,n;
	scanf("%d",&n);
	while(n--){
		scanf("%s",a);
		for(i=0;i<strlen(a);i++){
			for(j=0;j<3;j++){
				for(k=0;k<11;k++){
					if(a[i]==str[j][k])
					printf("%c",str[j][k-1]);
				}
			}
		}
		
		printf("\n");
	}
	
	
}
		

Double click to view unformatted code.


Back to problem 3851