Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  PalinDrom.java
Language: JAVA
Code:
class PalinDrom
{
     public static void main(String args[])
     {
     //     int num=Integer.parseInt(args[0]);
          int num=12321;
          int rev=0;
          int temp=0;
          while(num>0)
          {
               temp=num%10;
               num=num/10;
               rev=rev*10+temp;
          }
          if(num==rev)
          {
               System.out.println("palindrome");
          }
          else
          {
               System.out.println("not palindrom");
          }
     }
}     
Comments: