View Code of Problem 3851

#include <stdio.h>
#include <string.h>
int main( ){
	int T;
	char str[101];
	scanf("%d",&T);
	char c;
	c=getchar( );
	char s[]="qwertyuiop[asdfghjkl;zxcvbnm,";
	int i;
	int j;
	while(T--){
		gets(str);
		for(i=0;str[i];i++){
			for(j=0;j<29;j++){
				if(str[i]==s[j]){
					printf("%c",s[j-1]);
				}
			}
		}
		printf("\n");
	}
	return 0;
} 

Double click to view unformatted code.


Back to problem 3851