标签:http io ar for c on r ef as
题目链接:点击打开链接
键盘移位了,问输出对应的字母
#include <cstdio> #include <cstring> char a[105]; char b[3][11] = {"qwertyuiop","asdfghjkl;","zxcvbnm,./"}; int main() { scanf("%s", a); if(a[0] == 'R') { scanf("%s", a); int n = strlen(a); for(int i = 0; i < n; i ++) { for(int j = 0; j < 3; j ++) { for(int k = 1; k < 10; k ++) { if(a[i] == b[j][k]) printf("%c", b[j][k-1]); } } } } else { scanf("%s", a); int n = strlen(a); for(int i = 0; i < n; i ++) { for(int j = 0; j < 3; j ++) { for(int k = 0; k < 10; k ++) { if(a[i] == b[j][k]) printf("%c", b[j][k+1]); } } } } puts(""); return 0; }
标签:http io ar for c on r ef as
原文地址:http://blog.csdn.net/qq574857122/article/details/39854343