OK - here's how you'd go about doing what you want - I'm not going to do your assignment for you
First, you need to put your text into an array. Find the length of the array.
Second, create a second array of the same size
Your loop is like:
.array1 = "John Smith";
.array2;
For index = 0 to length-1 do {
array2[index] = array1[length - index - 1];
}
So, first time through:
length = 10
index = 0
array1 = "John Smith"
array2 = "h"
Second time through:
length = 10
index = 1
array1 = "John Smith"
array2 = "ht"
The rest is left to the reader as an interesting exercise.
Of course, consider the trivial case:
array1 = "Go hang a salami, I'm a lasagna hog"
Frank