Computer Science, asked by tboi77652, 3 months ago

write a program to input a 2 digit number and check wether it is a palindrome or not

( A number is a Palindrome which when read in reverse order is same as read in the right order )​

Answers

Answered by krishnabajaj1506
2

Answer:

import java.util.*;

class ab

{

void main()

{

Scanner sc = new Scanner(System.in);

System.out.println("Enter the number");

int num= sc.nextInt();

int r=num%10;

int rev = r;

r=r/10;

rev= (rev*10)+r;

if(rev==r)

System.out.println("Pallindrome number");

else

System.out.println("Not a Pallindrome number");

}

}

Similar questions