UVA 10082

#include<iostream>
#include<cstring>
using namespace std;
char a[100]="`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./";
int main()
{
    char ch[1000];
    while(cin.getline(ch,1000))
    {
        for(int i=0;i<strlen(ch);i++)
        {
            if(isgraph(ch[i])&&!isdigit(ch[i]))
            {
                char *p;
                p=strchr(a,ch[i]);
                cout<<a[p-a-1];
            }
            else
                cout<<ch[i];
        }
        memset(ch,0,sizeof(ch));
        cout<<endl;
    }
    return 0;
}

 

posted @ 2012-04-28 11:50  open your eyes  阅读(138)  评论(0编辑  收藏  举报