#include
#include
using namespace std;
int main()
{
string S, Slovo = "";
cout << "Введите строку текста: ";<br> getline(cin,S);
S+='.';
bool C = 1;
for (int i = 0; i < S.length(); i++)
{
if (S[i] != ' '&&S[i] != ','&&S[i] != '.'&&S[i] != ':'&&S[i] != ';'&&S[i] != '?'&&S[i] != '!')
Slovo+=S[i];
else
{
bool B = 0;
for(int j = 0; j+2 < Slovo.length(); j++)
{
for(int m = j+2; m < Slovo.length(); m++)
{
if (Slovo[j] == Slovo[m]&&Slovo[j+1] == Slovo[m+1]) B = 1;
}
}
if (B)
{
cout<<"\n" <<Slovo;<br> C = 0;
}
while (S[i] != ' '&&S[i] != ','&&S[i] != '.'&&S[i] != ':'&&S[i] != ';'&&S[i] != '?'&&S[i] != '!'&&S[i] != '\0')!
i++;
Slovo=S[++i];
}
}
if (C) cout <<"\nИскомых слов в тексте не обнаружено.";<br> return 0;
}