What is palindrome no
. in java
Answers
A palindrome is a word or number that is read the same backwards as it is forwards. A palindromic number is the same number that is read forward and backwards. Task 1: Investigate these sentences.
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.
Use:
A palindrome is a word or number that is read the same backwards as it is forwards. A palindromic number is the same number that is read forward and backwards. Task 1: Investigate these sentences.
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.
Palindromes are used in DNA for marking and permitting cutting. They are used to change one dimensional chain into 2 or 3 dimensional structure.
How to check if a number is palindrome
Declare two variables: one stores the given number, and the other stores the reversed number.
Run the do-while loop until the number of digits in the reversed number are equal to the number of digits in the given number.
Check if the reversed number is equal to the given number.