UVa 10082 WERTYU

/* File: 10082.cpp Author: ACboy Date: 2010-3-29 Result: AC Descripition: UVa 10082 WERTYU */ #include <stdio.h> int main() { #ifndef ONLINE_JUDGE freopen("10082.txt", "r", stdin); #endif char s[] = "`1234567890-=QWERTYUIOP[]//ASDFGHJKL;'ZXCVBNM,./"; char c; while ((c = getchar()) != EOF) { int i; for (i = 1; s[i] && s[i] != c; i++); if (s[i]) { printf("%c", s[i - 1]); } else { printf("%c", c); } } return 0; }

你可能感兴趣的:(c,File,2010)