why does the app not accept my code, if it is correct | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

why does the app not accept my code, if it is correct

#include <iostream> #include <string.h> using namespace std; int main() { string cadena; string new_str; cout<<"Introduzca la palabra: "; getline (cin, cadena ); for(int i = cadena.length();i>=0;i--){ new_str += cadena[i]; } cout<<new_str<<endl; return 0; }

5th Nov 2022, 10:57 PM
Akirito Emlz
Akirito Emlz - avatar
1 Answer
+ 2
https://code.sololearn.com/cmn3Dj64TGJE/?ref=app A bit rectification is required compare your code with this
6th Nov 2022, 3:09 AM
I am offline
I am offline - avatar