write a program in bluej to show palindrome number
Answers
Answered by
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
1
Note ..Refer the attachment.
I will give question tall in that Anadi
Attachments:
Similar questions
Social Sciences,
25 days ago
History,
25 days ago
Chemistry,
1 month ago
Science,
8 months ago
Social Sciences,
8 months ago
Math,
8 months ago