Computer Science, asked by arnavagrawal876, 18 days ago

Write a program to input a number from the user and print whether it is a palindrome number or not as follows.
int palindrome(int p): To check and return whether the number is a palindrome number or not.(A number which is read same from both the sides is called palindrome number. E.g. 121, 454, 12321, 565…etc.) The function returns 1(one) if the number is palindrome otherwise returns 0(zero)
void main(): To input a number from the user and print whether it is a palindrome number or not using a returned type method called int palindrome(int n)please give the full program in java​

Answers

Answered by rashmiverma08071978
1

Answer:

A string is called a palindrome string if the reverse of that string is the same as the original string. For example, radar, level, etc.

Similarly, a number that is equal to the reverse of that same number is called a palindrome number. For example, 3553, 12321, etc.

To check a Palindrome in Java, we first reverse the string or number and compare the reversed string or number with the original value.

Similar questions