write a program to check whether it is a palindrome or not ?
Input : 12321
output : it is a palindrome
input : mam
input : 12345
output: not a palindrome
Discussion posts and replies are publicly visible
Atleast give it a try before posting here.
a!localVariables( local!input: char(code(ri!input)), local!reverse: reverse(local!input), and(local!reverse = local!input) )
I tried this logic, its not working for number like 121, 1331.
Then try it again. It still works perfectly for any palindrome.