Computer Science, asked by soffia44666, 3 months ago

Please Don’t Spam....

Attachments:

Answers

Answered by AnindaBasu
1

Answer:

import java.util.*;

class palindrome

{

public static void main(String args[ ] )

{

int num,rev=0,p;

Scanner sc=new Scanner(System.in);

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

num=sc.nextInt();

p=num;

while(num>0)

{

rev=rev*10+(num%10);

num=num/10;

}

if(rev==p)

{

System.out.println("It is Palindrome Number ");

}

else

{

System.out.println("It is Not a Palindrome Number ");

}

}

}

Similar questions