reversing text
public text v1 · immutable#include <iostream>
#include <string.h>
using namespace std;
int main()
{
char Line[4096] = { 0 };
char Other[4096] = { 0 };
while( true )
{
cin.getline( Line, 4095 );
if( strcmp( Line, "q" ) == 0 )
break;
int l = strlen( Line );
for( int i = 0; i < l; ++i )
Other[ l - i - 1 ] = Line[i];
Other[ l ] = '\0';
cout << Other << "\n";
}
return 0;
}