字符平移 FLY_lai · 2022-12-27 21:59:21 · 个人记录 int n; //n是平移格数 cin >> n >> str; for (int i = 0; s[i] != '\0'; i++) cout << (s[i] - 'a' + n) % 26 + 'a';