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 are the vectors in c++?
What is the best way to take screenshots of a window with c++ in windows?
Will a catch statement catch a derived exception if it is looking for the base class?
Specify different types of decision control statements?
What is a unnitialised pointer?
What problems might the following macro bring to the application?
what is VOID?
Explain the operation of overloading of an assignment operator.
What is the difference between map and hashmap in c++?
What are the effects after calling the delete this operator ?
Explain abstraction.
How many static variables are created if you put one static member into a template class definition?
What is c++ try block?
Which programming language is best to learn first?
What is a tuple c++?