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 / dk

<html>
<body>
<script type="text/javascript">
var n,n1,s,d;
n=prompt('Enter a Number.');
n1=n;
s=0;
while(n!=0)
{
d=n%10;
n=(n-d)/10;
s=(10*s)+d;
}
if(s==n1)
document.write(n1+" is a palindrome");
else
document.write(n1+" is not a palindrome");
</script
</body>
</html>

Is This Answer Correct ?    36 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why javascript is not secure?

968


What Is The Disadvantages Using InnerHTML In JavaScript?

1015


How can an HTMLCollection be traversed?

1032


How are object properties assigned?

931


Is JavaScript a true OOP language?

1076


What is js injection?

924


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

1341


What is difference between java and javascript?

1027


How you will add function as a property in a javascript object? Give an example.

1000


Explain hoisting in javascript?

1064


How do you name a variable in javascript?

973


Can array in javascript be extended?

899


Explain the typeof operator?

968


What is the difference between client side javascript and server side javascript.

1098


How to have the status line update when the mouse goes over a link (the support of the status line is sporadic)?

991