hahahaha
2023-12-24 19:48:11
发布于:广东
4阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
typedef char c;
c cha(c h){
if(h >= 'a' and h <= 'w' or h >= 'A' and h <= 'W'){
return char(h + 3);
}else if(h >= 'x' and h <= 'z' or h >= 'X' and h <= 'Z'){
return char(h - 23);
}
}
c caps(c h){
if(h >= 'A' and h <= 'Z'){
return char(h + 32);
}else{
return char(h - 32);
}
}
int main(){
char k[1000], a[1000], b[1000];
cin >> k;
int len = strlen(k);
for(int i = 0; i < len; i++){
a[i] = cha(k[i]);
}
for(int i = len - 1; i >= 0; i--){
b[len - i] = a[i];
}
for(int i = 1; i <= len; i++){
cout << caps(b[i]);
}
return 0;
}
这里空空如也
有帮助,赞一个