Still two cases failed

#include
#include
using namespace std;
int main() {
string str;
getline(cin,str);
string str_rev;
for(int i= str.size()-1;i>=0;–i){
str_rev.push_back(str[i]);
}
if(str_rev==str){
cout<< “true”;
}
else
cout<<“false”;
}

please help

hello @abhinav292

we are given numbers in input that too in different lines
u cant read them in a single string.

use array of strings to read the numbers and then apply ur logic

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.