write a java program to input an integer and check whether the input number and its reverde are same or not
Answers
Answered by
2
Answer:
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;
Answered by
1
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
Business Studies,
1 month ago
Biology,
1 month ago
English,
1 month ago
Psychology,
3 months ago
Computer Science,
3 months ago
Math,
10 months ago
Computer Science,
10 months ago
Science,
10 months ago