Asked in
C Programming
Palindromes

Write a C program to check whether the string is palindrome or not?

Answer

User Avatar
Wiki User
July 08, 2012 3:29PM

cls

input "enter a string=";s$

l=len(s$)

for i = l to 1 step-1

c$=mid$(s$,i,l)

next i

r$=c$+r$

if r$=c$ then

print "no. is palindrome"

else

print "no. is not palindrome"

endif

end