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

What is a framework programming?

919


what is the difference between wrappers and primitives es: diff between int i=200 in primitives and integeri = new integer(54)

2335


How are event handlers utilized in javascript?

1065


What are the ways to emit client-side javascript from server-side code in asp. Net?

993


What is the use of a number object in javascript?

976


What are the different objects used in javascripts?

951


What does js stand for?

914


What is difference between arrow function and normal function?

889


How to accessing elements using javascript?

1018


How dhtml is used in javascript?

990


Why are callbacks used?

877


What is called variable?

883


Explain export & import in javascript?

1026


What can be the challenges during testing a program or a system?

2228


What are the four basic data structures in javascript?

993