+ 2
Someone will tell me what's wrong with this code?
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { string str1,str2; cout<<"Enter the string:-\n"; cin>>str1; reverse(str1, str1.end()); if(str1!=str2) { cout<<"string is not polindrome"<<endl; } else { cout<<"string is polindeome"<<endl; } return 0; }
2 Respuestas
+ 2
Thanks now it's working