Saturday, January 17, 2015

Reversing a String

The simple program below demonstrates reversing a user inputted string.
Basic outline:
  1. User inputs a string
  2. An empty reverse string variable is created
  3. A while loop is utilized to create the reverse string by starting at the end of the user inputted string, using indexing.
  4. The reverse message is printed.

No comments:

Post a Comment