代码如下:
#include<stdio.h>
char *s="`1234567890-=QWERTYUIOP[]/ASDFGHJKL;'ZXCVBNM,./";
int main()
{
int i;
char c;
while((c=getchar())!=EOF)
{
for(i=1;s[i]&&s[i]!=c;i++);
if(s[i])
putchar(s[i-1]);
else
putchar(c);
}
return 0;
} 原文:http://blog.csdn.net/ice_alone/article/details/39208909