Untitled
unknown
plain_text
3 years ago
376 B
8
Indexable
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str;
setlocale(LC_ALL, "Russian");
cout << "Введите свой пароль: ";
getline(cin, str);
for (int i = 0; i < str.size(); i++)
{
if (str[i] != ' ') {
str[i] += 2;
if (str[i])str[i] -= 26;
}
}
cout << "Вот ваш код: ";
cout << str;
}Editor is loading...