Skip to content

Commit 75911b0

Browse files
authored
Create PalindromeNumber.java
1 parent d4f6b3d commit 75911b0

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

PalindromeNumber.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# https://www.facebook.com/aditya.gite.9231/posts/652379562481592
2+
# Subscribed by Aditya Gite
3+
class PalindromeNumber{
4+
public static void main(String args[]){
5+
int r,sum=0,temp;
6+
int n=454;
7+
8+
temp=n;
9+
while(n>0){
10+
r=n%10;
11+
sum=(sum*10)+r;
12+
n=n/10;
13+
}
14+
if(temp==sum)
15+
System.out.println("palindrome number ");
16+
else
17+
System.out.println("not palindrome");
18+
}
19+
}

0 commit comments

Comments
 (0)