View Code of Problem 3851

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

int main(){
	int t;
	scanf("%d",&t);
	char s[100];
	char r[100]="qwertyuiopasdfghjklzxcvbnm";
	char w[100]="wertyuiop[sdfghjkl;xcvbnm,]";
	while(t--){
		
		scanf("%s",s);
		for(int i=0;i<strlen(s);i++){
			for(int j=0;j<strlen(w);j++){
				if(s[i]==w[j]){
					printf("%c",r[j] );
				}
			}
		}
		printf("\n" );

	}

	return 0;
}

Double click to view unformatted code.


Back to problem 3851