write a program to check palindrome number in Java
Answers
Answer:
In this program,
First, given number (num)'s value is stored in another integer variable, originalInteger. This is because, we need to compare the values of reversed number and original number at the end.
Then, a while loop is used to loop through num until it is equal to 0.
On each iteration, the last digit of num is stored in remainder.
Then, remainder is added to reversedInteger such that it is added to the next place value (multiplication by 10).
Then, the last digit is removed from num after division by 10.
Finally, reversedInteger and originalInteger are compared. If equal, it is a palindrome number. If not, it isn't.
Answer:
Palindrome number in java: A palindrome number is a number that is same after reverse. For example 545, 151, 34543, 343, 171, 48984 are the palindrome numbers. It can also be a string like LOL, MADAM etc.
Palindrome number algorithm
Get the number to check for palindrome
Hold the number in temporary variable
Reverse the number
Compare the temporary number with reversed number
If both numbers are same, print "palindrome number"
Else print "not palindrome number"
Hope you understand from this
Mark is brainliest...