Write a program to input a number and check whether the number is palindrome or not. A number is said to be palindrome if the number and its reverse are equal. in java only
NO SPAMING
Answers
Explanation:
public class Palindrome {
public class Palindrome { public static void main(String[] args) {
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger;
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num;
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 )
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) {
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10;
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder;
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10;
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10; }
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10; } // palindrome if orignalInteger and reversedInteger are equal
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10; } // palindrome if orignalInteger and reversedInteger are equal if (originalInteger == reversedInteger)
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10; } // palindrome if orignalInteger and reversedInteger are equal if (originalInteger == reversedInteger) System.out.println(originalInteger + " is a palindrome.");
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10; } // palindrome if orignalInteger and reversedInteger are equal if (originalInteger == reversedInteger) System.out.println(originalInteger + " is a palindrome."); else
public class Palindrome { public static void main(String[] args) { int num = 121, reversedInteger = 0, remainder, originalInteger; originalInteger = num; // reversed integer is stored in variable while( num != 0 ) { remainder = num % 10; reversedInteger = reversedInteger * 10 + remainder; num /= 10; } // palindrome if orignalInteger and reversedInteger are equal if (originalInteger == reversedInteger) System.out.println(originalInteger + " is a palindrome."); else System.out.pri tln(originalInteger + " is not a palindrome.");
tln(originalInteger + " is not a palindrome."); }
tln(originalInteger + " is not a palindrome."); }}