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 is the function of public class main ?

2056


What is use strict in javascript?

988


Is notepad ++ an ide?

951


Between JavaScript and an ASP script, which is faster?

1266


What is the difference between window.onload and ondocumentready?

971


Write a program to exaplain the deferred scripts using event handlers in javascript.

950


What does clean white space mean?

901


What are Cookies in Javascript?

1069


Taking a developer's perspective, do you think that that javascript is easy to learn and use?

985


What is the most popular javascript library?

973


Write a program in Java to display the IP address of the local and remote machine.

2262


What are exports & imports?

1027


List the comparison operators supported by javascript?

1011


What is the === in javascript?

930


What are the methods involved in javascript?

1080