write a program to input a word and check whether it is a palindrome word or not
Answers
Answered by
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 ");
}
}
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
Social Sciences,
7 months ago
Physics,
7 months ago
Business Studies,
7 months ago
Math,
1 year ago
Math,
1 year ago
Music,
1 year ago
Math,
1 year ago
Computer Science,
1 year ago