include iostream include stdio include string include windows using na

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <windows.h>
using namespace std;
string name;
int k = 0;
char ch;
int main() {
setlocale(LC_ALL, "Russian");
while (ch != 'n') {
k = 0;
system("cls");
cout << "Введите строку: ";
cin >> name;
for (int i = 0; i < (int) (name.length() / 2); i++) {
if (name[i] != name[name.length() - i - 1]) k++;
}
if (k == 0) cout << "Строка чёткая!" << endl;
else cout << "Говно строка." << endl;
cout << endl << "Продолжаем? (y/n) ";
cin >> ch;
}
return 0;
}