Please Don’t Spam....
Attachments:
Answers
Answered by
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
English,
1 month ago
Computer Science,
1 month ago
English,
1 month ago
English,
3 months ago
Math,
3 months ago
English,
9 months ago
Computer Science,
9 months ago
Physics,
9 months ago