How to make the right flowchart for a palindrome
Dear people who want to help:),
I have to make two flow charts for a program that determines if a word a palindrome is or not. So I need in text written algorithm for this program.
Seems to be an easy job for most people. But i'm having a hard time construction the second one.
The first one is like this:
1.Ensure all values are proper
2. Read through string from left to right
3. Reverse string
4. If both are identical, you've got your palindrome
Ofcourse I have more specific points in my flow chart.
Now to get a total different one about the same problem is it a parlindrome or not?
What you can change is the third step. My idea was, to read the first letter and the last letter and check if the match. If so carry on with the second letter. But how does he now when to stop. What i'm trying to do is to reach the middel, but how does he know when he's in the middel. I saw a few examples of the codes with wich you can make the actual program and i noticed that the divided the amount of letters by 2. Why's that. What's next after you divided?
I hope someone can help me.
Thanks in advance!