write a java program to check the given number is palindrome or not using function
Answers
Answered by
2
Answer:
In this java program, we will get a number variable and check whether number is palindrome or not.
- class PalindromeExample{
- public static void main(String args[]){
- int r,sum=0,temp;
- int n=454;//It is the number variable to be checked for palindrome.
- temp=n;
- while(n>0){
- r=n%10; //getting remainder.
- sum=(sum*10)+r;
Similar questions
Science,
2 months ago
Math,
2 months ago
History,
5 months ago
Biology,
11 months ago
Social Sciences,
11 months ago