Computer Science, asked by 05Kanishk, 4 days ago

{JAVA}
Write a program to input a numbers and display palindromes using the following functions:-
void input( ) : Input a no.
int reverse( ) : To reverse the number
void isPalin( ) : Checks and displays a no. if it is a palindrome
main( ) : Main function in the program

Answers

Answered by 8a10kavyadixit
0

Answer:

Checking whether a number is palindrome or not is a classical Java homework exercise. When you start learning Java programming most institute which teaches Java programming provides these classical Java programs like How to find Armstrong number in Java or how to find the Fibonacci number in Java using recursion etc. Write a Java program to check if the number is palindrome comes from the same category. For those who are not familiar with palindrome numbers, a palindrome number is a number that is equal to the reverse of itself.

For example, 121 is a palindrome because the reverse of 121 is 121, while 123 is not a palindrome in Java because the reverse of 123 is 321 and 121!=321. Finding a palindrome number is easy in Java, you just need to develop logic to reverse a number in Java.

Thankfully Java provides a couple of arithmetic operators like remainder(%) operator also known as modules operator, which returns remainder in division operator and division operator(/) which returns quotient. By using remainder and division operator in Java we can create program to check if the number is palindrome or not.

Pls mark me as brainlist

Similar questions