Computer Science, asked by Sirshak, 1 year ago

write a program to input a word and check whether it is a palindrome word or not

Answers

Answered by Anonymous
2
hey mate ur answer is


public class palindrome
{
public static void main(int n)
{
int r,d,c;r=0;
c=n;
do
{
d=n%10;
r=r*10+d;
n=n/10;
}
while(n!=0)
if(r==c)
System.out.println("the number is palindrome");
else
System.out.println("the number is not palindrome ");
}
}


Similar questions