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

What's relationship between JavaScript and ECMAScript? And What are JavaScript types?

1020


What is the importance of javascript?

890


What are two-way data binding and one-way data flow, and how are they different?

1022


What are the limitations of javascript?

901


How do you check if an object is an array or not?

933


How to comment javascript code?

936


How to hide javascript code from old browsers that dont run it?

971


What does the following statement declares?

930


Explain the term closure?

973


What is the most popular javascript library?

869


How do you write an if statement in javascript?

881


just for testing

2095


What is a function callback?

942


How do you check if a value is a number in javascript?

914


Explain the different types of pop-up boxes you can create in JavaScript.

931