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 a program to check whether a given number is a
palindrome or not?

Answer Posted / ankita

//Program to check the given number is palindrome or not//


<html>
<head>
<script language="javascript">
var num,n,rev=0,r;
num=prompt("Enter the number");
n=num;
while(parseInt(num)>0)
{
r=parseInt(num)%10;
rev=parseInt(rev)*10+parseInt(r);
num=parseInt(num)/10;
}
if(rev==parseInt(n))
document.write(n+ " is a palindrome number");
else
document.write(n+ " is not a palindrome number");
</script>
</head>
<body>
</body>
</html>

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which built-in method adds one or more elements to the end of an array and returns the new length of the array?

1322


What does two exclamation marks mean in javascript?

965


How to add new elements dynamically?

998


what difference between args.length and args.length() in command line argument?

2291


What does "1"+2+3 evaluate to?

939


Explain the difference between java and javascript.

1048


What is callback in javascript?

988


How do I use an external javascript file?

1012


What is the use of anonymous function in javascript?

875


What is namespacing in javascript and how is it used?

962


What is the difference between the keywords var and let?

986


What is the difference of "settimeout" function and setinterval functions in javascript

1084


What is closure?

1087


Why is javascript not oop?

904


What is this? Var myarray = [[[]]];

1027