0
Make a program to accept any word of 5 characters and print palendrome
2 Réponses
+ 2
think of first defining a function to compute whether a word is a palindrome. it's quite easy if you consider it being a recursive function. then you could reuse the function for words of any size
0
I have a palindrome program on my profile you could use as a starting point and modify it to only take words of 5 characters in length (using an if statement to make sure MyString.length () == 5). If the length returned is something other than 5, you can re-prompt the user for a string 5 characters long.