Hello!I have to check one txt file for simetrical words(like 1221 or abccba) and put these simetrical words into other file.End of word is ().,!? or space
I have figured out how to find out if string is simetrical.
int main() {
char s[100];
gets(s);
int len=strlen(s);
bool b=true;
for (int i=0;i<len;i++)
if (s[i]!=s[len-i-1]) b=false;
if (b) cout << "is!\n"; else cout << "is not\n";
system("Pause");
return 0;
i know how to read symbols one by one,but i have no idea how to make it stop when !?.,() is the symbol.