Answer Posted / mahesh
import java.lang.*;
class Plindrome
{
public static void main(String arg[])
{
int n=121,m;
int rev,rem;
rev=0;m=n;
while(n>0)
{
rem=n%10;
rev=rev*10+rem;
n=n/10;
}
if(m==rev)
{
System.out.println("palindrome",+rev);
}
else
{
System.out.println("not palindrome",+rev);
}
}
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How do I open the java control panel?
What is rxjava2?
In java thread programming, which method is a must implementation for all threads?
Which is more secure: java or activex? : java security
What is serializable in java?
Describe life cycle of thread?
What is java net url?
Why doesn't lsdou work under windows nt? : java security
What is web container in java?
Why oracle type 4 driver is named as oracle thin driver?
Explain the reason for each keyword of public static void main(string args[])?
What is the use of flatmap?
Why are lambda functions called lambda?
What is dao in java?
How do I enable java in google chrome?