Unverified Commit 2ae458f5 authored by Lokesh Singh's avatar Lokesh Singh Committed by GitHub

Create Check no. is palindrome or not

parent 247b1221
public static void main(String[] args) {
int num = 12321, result = 0, digit;
int x=num;
while(num!=0)
{
digit = num%10;
result = result*10+digit;
num/=10;
}
if(x==result){
System.out.println("no. is palindrom");}
else{
System.out.println("no is not palindrom");}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment