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
If you want to share several functions or variables in several files maitaining the consistency how would you share it?
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
What it is and how it might be called (2 methods).
Is c++ the most powerful language?
Difference between a homogeneous and a heterogeneous container
Describe linkages and types of linkages?
Are strings mutable in c++?
What is polymorphism in c++? Explain with an example?
Can I have a reference as a data member of a class? If yes, then how do I initialise it?
Can I create my own functions in c++?
Write a program using shift_half( ) function to shift the elements of first half array to second half and vice versa.
Define token in c++.
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
What is an undefined behavior and sequence points
How does code-bloating occur in c++?