Computer Science, asked by anadikedia4, 1 month ago

write a program in bluej to show palindrome number​

Answers

Answered by chordiasahil24
1

Explanation:

import java.util.io*

public class palindrome

{

public static void main()

{

Scanner sc = new Scanner(System.in);

int r,sum=0,temp,n;

System.out.println("enter a number");

n = sc.nextInt();

temp=n;

while(n>0)

{

r=n%10;

sum=(sum*10)+r;

n=n/10;

}

if(temp==sum)

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

else

System.out.println("not palindrome");

}

}

Answered by viratdhoni187
1

Note ..Refer the attachment.

I will give question tall in that Anadi

Attachments:
Similar questions