how can program polindrome using java
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 |
What is the difference between Logical Parallelism and Physical Parallelism?
Why java is better than node.js?
What is spliterator in java se 8?
Is java an api?
What is the java virtual machine (jvm)?
What is a container in java?
What are jpa repositories?
What is the difference between a jvm and a jdk?
What are all the documents have you involved in preparation of a Project as a Project Lead?
What is the purpose of jdk?
How can I check single byte, double byte of character in JTextField?(eg. japan unicode and English unicode)
Please tell what are frames,pannel,container,jframe,jpannel and what are there relation?