!!! Программа не работает с кириллицей !!!#include "stdafx.h"#include <iostream>#include <string>using namespace std;string cod(char* text,int ROT) { for (int i = 0; i < strlen(text); i++) if (text[i] != ' ') text[i] += ROT; return text; };string decod(char* text, int ROT) { for (int i = 0; i < strlen(text); i++) if (text[i] != ' ') text[i] -= ROT; return text; };int main() { setlocale(LC_ALL, "Rus"); cout << "Введите текст: " << endl; char s[256]; cin.getline(s,255); cout << "Что нужно сделать(1-декод. 2-код.): " << endl; int d; cin >> d; cout << "ROT:" << endl; int ROT; cin >> ROT; if (d == 2) cout<< cod(s, ROT)<< endl; else cout<< decod(s, ROT)<< endl; system("pause");}Пример(1):Введите текст:ProverkaЧто нужно сделать(1-декод. 2-код.):2ROT:3SuryhundПример(2):Введите текст:SuryhundЧто нужно сделать(1-декод. 2-код.):1ROT:3Proverka