首页 > 代码库 > 10082 WERTYU

10082 WERTYU

#include<stdio.h>
#include<string.h>
int main ()
{
    char a[52]={"`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./"};
    char b[100];
    int len ,i ,j;
    while(gets(b)!=NULL)
    {
        len=strlen(b);
        for(i=0;i<len;i++)
        {
            if(b[i]=='q'||b[i]=='a'||b[i]=='z'||b[i]==' ')
               printf("%c",b[i]);
            else
            {
                for(j=0;j<50;j++)
                {
                    if(b[i]==a[j])
                        printf("%c",a[j-1]);
                }
            }
        }
        printf("\n");
    }
}

10082 WERTYU