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; }
1 Respuesta
+ 2
https://code.sololearn.com/cmn3Dj64TGJE/?ref=app
A bit rectification is required compare your code with this