+ 1

Help Test getting failed

#include <iostream> #include <algorithm> using namespace std; int main() { string word; cout<<"Type a word : "; cin>>word; reverse (word.begin(),word.end() ); cout <<word; return 0; } This is my code i'm getting the correct answer but test keep getting failed

13th May 2021, 5:28 AM
Haider Ittefaq
Haider Ittefaq - avatar
4 Answers
+ 4
remove this line from your code and try to run again: cout<<"Type a word : ";
13th May 2021, 5:36 AM
minirkk
minirkk - avatar
+ 2
Thanks bro it worked.
13th May 2021, 5:37 AM
Haider Ittefaq
Haider Ittefaq - avatar
0
Is this for code coach problem?
13th May 2021, 5:30 AM
minirkk
minirkk - avatar
0
Yes
13th May 2021, 5:31 AM
Haider Ittefaq
Haider Ittefaq - avatar