Saturday, January 19, 2019

Palindrome Number: A Palindrome number is a number that remains the same when its digits are reversed.
We get total 90 numbers between 100 and 1000.

public class PalindromeNumber {

public static void main(String[] args) {

int n=121;
int rev=0;
int temp=n;
while(n!=0){
rev=rev*10+n%10;
n=n/10;
}
if(temp==rev){
System.out.println(temp+" Is Palindrome");
}else{
System.out.println(temp+" Is Not Palindrome");
}
}
}

0 comments:

Post a Comment

selenium-repo by venu

Blog helps to a student or IT employee to develop or improve skills in Software Testing.
For Online Classes Email us: gadiparthi122@mail.com

Followers

About Me

My photo
Hyderabad, Andhra Pradesh, India
I am Automation Testing Professional. I have completed my graduation in B.Tech (Computers) from JNTU Hyderabad and started my career in Software Testing accidentally since then, I passionate on learning new technologies

Contact Form

Name

Email *

Message *

Popular Posts