View Code of Problem 3851

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

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

Double click to view unformatted code.


Back to problem 3851