UVa 10082 WERTYU

UVa 10082 WERTYU
以下是我的代码:
#include < stdio.h >
int  main()
{
    
/*
    freopen("data.in","r",stdin);
    freopen("data.out","w",stdout);
    //
*/
    
const   char  s[] = " `1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./ " ;
    
char  c;
    
while ((c = getchar()) != EOF)
    {
       
long  i;
       
for (i = 1 ;s[i] && s[i] != c;i ++ )
         ;
       
if (s[i])
         putchar(s[i
- 1 ]);
       
else
         putchar(c);
    }
return   0 ;
}


你可能感兴趣的:(UVa 10082 WERTYU)