Help Test getting failed | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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
Rohit
+ 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
Rohit
0
Yes
13th May 2021, 5:31 AM
Haider Ittefaq
Haider Ittefaq - avatar