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 Respuesta
+ 2
https://code.sololearn.com/cmn3Dj64TGJE/?ref=app A bit rectification is required compare your code with this
6th Nov 2022, 3:09 AM
Random
Random - avatar