View Code of Problem 3851

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

Double click to view unformatted code.


Back to problem 3851