Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the return value of the insertion operator?

1176


How one would use switch in a program?

1116


Is it possible to get the source code back from binary file?

1429


Are there interfaces in c++?

1067


Define a nested class.

1126


What is dev c++ used for?

1079


How important is c++?

1034


Give an example of run-time polymorphism/virtual functions.

1058


What is the difference between containment and delegation?

1399


Difference between strdup and strcpy?

1252


Is dev c++ a good compiler?

1014


What does new in c++ do?

1069


Which one between if-else and switch is more efficient?

1125


Are c and c++ similar?

1112


Assume studentNames and studentIDs are two parallel arrays of size N that hold student data. Write a pseudocode algorithm that sorts studentIDs array in ascending ID number order such that the two arrays remain parallel.

2267