文章
84
粉丝
408
获赞
33
访问
877.1k
#include<iostream>
#include<cstring>
using namespace std;
const int M = 1024;
int main()
{
char line[M], ans[M];
cin.getline(line, M);
int i = 0;
while (line[i]) {
if (line[i] >= 'A' && line[i] <= 'Z')
ans[i] = 'A' + (line[i] + 3 - 'A')%26;
else if (line[i] >= 'a' && line[i] <= 'z')
ans[i] = 'a' + (line[i] + 3 - 'a')%26;
else
ans[i] = line[i];
i++;
}
ans[i] = '\0';
cout << ans << endl;
return 0;
}
登录后发布评论
暂无评论,来抢沙发