View Code of Problem 3851

#include<stdio.h>
#include<string.h>
#include "math.h"
int main()
{
	int t,n,i,j;
	char a[100]="qwertyuiopasdfghjklzxcvbnm";
    char b[100]="wertyuiop[sdfghjkl;xcvbnm,";
	scanf("%d",&t);
	while(t--)
	{
		char c[101];
		scanf("%s",&c);
		for(i=0;i<strlen(c);i++)
		{
			for(j=0;j<26;j++)
			{
				if(c[i]==b[j])
				{
					printf("%c",a[j]);
					break;
				}
			}
		}
		printf("\n");
	}
	  
	return 0;
}

Double click to view unformatted code.


Back to problem 3851