0
How to do palindrome programme?
6 Respostas
+ 1
thank you
0
reverse that string, check whether it is equal to irreversed string.
0
seriously I cannot understand!!
0
String word =" input";
String reverse;
int l = word. length();
for(int i = l; i>0;i--) {
reverse +=word.charAt(i);
}
if(word==reverse) {
boolean palindrome=true;
}
0
check it out...
input any number @ Molly
or even any string....
121 --> palindrome number
abhba--> palindrome string
https://code.sololearn.com/c9gRnH50FEmk/?ref=app
- 1
m=input("")
print("".join(list(m)[::-1]))
in python