提交时间:2024-11-01 15:53:38
运行 ID: 54981
#include<bits/stdc++.h> using namespace std; int main(){ char s[101]; cin >> s; int l = strlen(s); for(int i = 0; i <= l-1; i++) { s[i] = (s[i] + 3); if(s[i] >= 'a' and s[i] <= 'z') s[i] -= 32; else s[i] += 32; } for(int i = l-1; i >= 0; i--) { cout << s[i]; } // 让每一个字符s[i] + n return 0; }