No older revisions available
No older revisions available
~cpp #include <iostream> using namespace std; void main() { char buf[64] = {0, }; char reverse[64]; int i; cin >> buf; int length = strlen(buf); for(i=0; i<length ; i++){ reverse[(length-1)-i] = buf[i]; } reverse[length] = '\0'; cout <<reverse << endl; for(i=0; i<length; i++){ if(reverse[i] == buf[i]){ } else{ cout << "false" << endl; return ; } } cout << " true " <<endl; }