Untitled

 avatar
unknown
plain_text
2 years ago
398 B
4
Indexable
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string str;

	getline(cin, str);
	for (int i = 0; i < str.length(); i++)
	{
		if (str[i] == 'y')
			str[i] = 'a';
		else if (str[i] == 'Y')
			str[i] = 'A';
		else if (str[i] == 'z')
			str[i] = 'b';
		else if (str[i] == 'Z')
			str[i] = 'B';
		else if (str[i] != ' ')
			str[i] += 2;
	}
	cout << str;
}
Editor is loading...