0

Extra-Terrestrials

I solved the problem, but it still won't count

14th Jul 2023, 6:27 AM
prapor
prapor - avatar
8 Answers
+ 5
https://code.sololearn.com/cJ37klL34T1U/?ref=app Your's too work.... But lil modification needed ..in for loop it should be "tab.size()-1".... Look at this code...
14th Jul 2023, 7:36 AM
Riya
Riya - avatar
+ 5
Hailrake , Where is your attempt?? Post it here....
14th Jul 2023, 6:59 AM
Riya
Riya - avatar
+ 5
https://code.sololearn.com/c8C8VOuRPvQD/?ref=app You can use reverse function to make it easier.... Try this.... And don't post the code like this... write your code in code playground and post that Link in the description tag....as like I done here...
14th Jul 2023, 7:11 AM
Riya
Riya - avatar
+ 2
thank you
14th Jul 2023, 7:17 AM
prapor
prapor - avatar
0
#include <iostream> #include <cstring> int main() { std::string tab = ""; std::cin>>tab; std::string newstr = ""; for(int i=tab.size();i>=0;i--) { newstr += tab[i]; } std::cout << newstr; return 0; }
14th Jul 2023, 7:01 AM
prapor
prapor - avatar
0
im on mobile phone
14th Jul 2023, 7:01 AM
prapor
prapor - avatar
0
but why mine aint working? i tried to remove null symbol
14th Jul 2023, 7:19 AM
prapor
prapor - avatar
0
this problem is cursed
14th Jul 2023, 7:38 AM
prapor
prapor - avatar