write program for palindrome
Answer Posted / devunegi.negi
write program for palindrome in jdk........
import java.i.*;
class palindroame
{
public static void main(String args[])throws IEXception
int n,s,rev,m;
n=s
BufferedReader br =new BufferedReader(new InputStreamReader
(System.in));
System.out.println("Enter the Digit=");
s=Integer.parseInt(br.readLine());
While(s!=0)
{
m=s%10;
rev=(10*rev)+m;
s=s/10;
}
if(rev==n)
System.out.println("This number is Palindrome");
else
System.out.println("This number is Not palindrome");
}
| Is This Answer Correct ? | 13 Yes | 9 No |
Post New Answer View All Answers
what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
Implement stack operations with pointers with appropriate exception checks.
Is there any function that can skip certain number of characters present in the input stream?
What is a try block?
Suppose that data is an array of 1000 integers. Write a single function call that will sort the 100 elements data [222] through data [321].
Write a program to find the reverse Fibonacci series starting from N.
Who invented turbo c++?
What is a storage class? Mention the storage classes in c++.
Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);
What are the types of array in c++?
Why are arrays usually processed with for loop?
How to give an alternate name to a namespace?
Is c++ vector dynamic?
What does h mean in maths?
What is a manipulative person?