here is how I would code it.
cout << "The string reversed: ";
for (i = strlen(reversedUserInput)-1; i >= 0; i--)
{
// print the ith character
cout << reversedUserInput[i];
}
cout << "\n";
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,954 posts
since Aug 2005