Palindrone
Author |
Message |
Jessica359
|
Posted: Thu May 29, 2008 9:11 am Post subject: Palindrone |
|
|
Hey,
I'm not sure what function to use for this?
A Palindrome application which allows the user to input a list of words or phrases from a data file. Display each word as entered and reversed. If the word is the same forwards and backwards tell the user it is a palindrome, otherwise tell the user it is not a palindrome.
So like if the user puts in "racecar" it will say that it is a palindrone but if they but in "cat" then it will say its not a palindrone.
thnxs |
|
|
|
|
|
Sponsor Sponsor
|
|
|
gitoxa
|
Posted: Thu May 29, 2008 2:54 pm Post subject: RE:Palindrone |
|
|
There is no function to do this for you, you need to use string manipulation. |
|
|
|
|
|
spicypolvoron
|
Posted: Thu May 29, 2008 7:48 pm Post subject: RE:Palindrone |
|
|
I had this assignment before, what I did was put the word backwards using for decreasing, and use if statement if the backward word is equal to the word. |
|
|
|
|
|
CodeMonkey2000
|
Posted: Thu May 29, 2008 9:07 pm Post subject: RE:Palindrone |
|
|
Check out string manipulation in the Turing Walkthrough. Remember, strings are just an array of characters, and can be compared as such.
code: | var myString : string := "Hello World"
put myString
for x : 1 .. length (myString)
put myString (x)
end for
|
|
|
|
|
|
|
Jessica359
|
Posted: Fri May 30, 2008 7:25 am Post subject: RE:Palindrone |
|
|
ok thank you |
|
|
|
|
|
|
|