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 ++ count and count ++?
Is there structure in c++?
Explain how we implement exception handling in c++?
What is the use of main function in c++?
Difference between declaration and definition of a variable.
Can we make copy constructor private in c++?
What is doubly linked list in c++?
. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?
What is a pointer how and when is it used?
which operator is used for performing an exponential operation a) > b) ^ c) none
State two differences between C and C++.
Why is c++ still used?
Can we sort map in c++?
Explain abstraction.
What is abstraction in c++?