我都快不想发题解了
2023-12-24 20:08:33
发布于:广东
9阅读
0回复
0点赞
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int main(){
char a[1000];
gets(a);
int len = strlen(a);
int n = 1;
for(int i = 0; i < len; i++){
if(a[i] >= 'A' and a[i] <= 'Z' - n){
a[i] += n;
}else if(a[i] >= 'a' and a[i] <= 'z' - n){
a[i] += n;
}else if(a[i] > 'Z' - n and a[i] <= 'Z'){
a[i] = a[i] - (26 - n);
}else if(a[i] > 'z' - n and a[i] <= 'z'){
a[i] = a[i] - (26 - n);
}
}
cout << a;
return 0;
}
全部评论 2
相似度百分百
2024-08-06 来自 北京
0和法希兰玫瑰的题解
2024-08-06 来自 北京
0
有帮助,赞一个