label Programming
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

Program for Pallindrome NUmber
Nov 30th, -0001

C Program to Check Whether a Number is Palindrome or Not

This program takes an integer from user and that integer is reversed. If the reversed integer is equal to the integer entered by user then, that number is a palindrome if not that number is not a palindrome.

C Program to Check Palindrome Number

/* C program to check whether a number is palindrome or not */#include<stdio.h>int main(){int n, reverse=0, rem,temp;
  printf("Enter an integer: ");
     temp/=10;}/* Checking if number entered by user and it's reverse number is equal. */if(reverse==n)  
      printf("%d is a palindrome.",n);else
      printf("%d is not a palindrome.",n);return0;}


Enter an integer: 12321
12321 is a palindrome.

Java program to find whether no. is palindrome or not

package testing;
import java.util.Scanner;

 * Java program to check if number is palindrome or not.
 * A number is called palindrome if number and its reverse is equal
 * This Java program can also be used to reverse a number in Java
public class NoClassDefFoundErrorDueToStaticInitFailure {

   public static void main(String args[]){
       System.out.println("Please Enter a number : ");
       int palindrome = new Scanner(;
           System.out.println("Number : " + palindrome + " is a palindrome");
           System.out.println("Number : " + palindrome + " is not a palindrome");
     * Java method to check if number is palindrome or not

   public static boolean isPalindrome(int number) {
       int palindrome = number; // copied number into variable
       int reverse = 0;

       while (palindrome != 0) {
           int remainder = palindrome % 10;
            reverse = reverse * 10 + remainder;
            palindrome = palindrome / 10;

       // if original and reverse of number is equal means
       // number is palindrome in Java
       if (number == reverse) {
           return true;
       return false;


Please Enter a number : 
Number : 123 is not a palindrome
Please Enter a number : 
Number : 123 is a palindrome

Please rate this answer as the best answer if you are satisfied as this is how I receive credit for my work. Thank you. 

May 31st, 2013

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
Nov 30th, -0001
Nov 30th, -0001
Jun 22nd, 2017
Mark as Final Answer
Unmark as Final Answer
Final Answer

Secure Information

Content will be erased after question is completed.

Final Answer