(UVA)10082-鍵盤
#include<stdio.h> int main(){ const char k[] = "`1234567890-=QWERTYUIOP[]\\ASDFGHJKL;'ZXCVBNM,./"; char c; while ((c = getchar()) != EOF){ int i; if (c == '\n') printf("%c",c); else if (c == ' ' ) printf("%c", c); else{ for (i = 0; k[i] != c; i++); printf("%c", k[i - 1]); } } return 0; }
留言
張貼留言