问题遇到的现象和发生背景
问题相关代码,请勿粘贴截图
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
char c;
while (c = getchar()) {
if (c >= 'a' && c <= 'z') c = 'a' + 26 - (c - 'a' + 1);
else if (c >= 'A' && c <= 'Z') c = 'A' + 26 - (c - 'A' + 1);
cout << c;
}
cout << endl;
return 0;
}