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

How do I open javascript console?

909


What is the potential disadvantage of using a sticky session?

857


Why is javascript so hard?

815


What Does JavaScript Void(0) Mean?

879


How to write hello world on the web page?

884


Explain a story about javascript performance problems?

870


What is an onclick?

865


How to create function in JavaScript?

1014


What is use of settimeout function in javascript?

1011


Are all javascript variables global?

890


What is stack in javascript?

912


What javascript means?

870


What is the difference between innerhtml and append() in javascript?

1180


What is difference between local variable and global?

867


Where are cookies actually stored on the hard disk?

875