View Code of Problem 3851

#include<stdio.h>
#include<string.h>
int main()
{
	char a[]={"qwertyuiop[asdfghjkl;zxcvbnm,"}; 
	char s1[100],s2[100];
	int t;
	scanf("%d",&t);
	for(int i=0;i<t;i++)
	{
		scanf("%s",s1);
		for(int j=0;j<strlen(s1);j++)
		{
			for(int k=0;k<strlen(a);k++)
			{
				if(a[k]==s1[j])
				{
					printf("%c",a[k-1]);
				}
			}
		}
		printf("\n");
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3851