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 do you mean by script?

835


What is the use of 'bind' method in JavaScript?

983


wap to accept an int array frm the user and print the lucky nos.

2057


How to convert json object to string?

984


How compare function works javascript?

800


What is differential inheritance?

905


What is a closure in javascript?

961


What is question mark in javascript?

856


What are the data types supported by javascript?

918


What does three dots mean in texting?

882


What is a boolean search?

814


The below script is working Internet browser but not working in mozilla plz find that good way... function doSubmit(op){ var rowcount=document.getElementsByName ("parameterTypeId").length; var parameterGrade; var performance; var goal; if(op == "save"){ for (var i=0; i < rowcount; i++) { var param=eval("document.forms [0].parameterGrade"+i); if(param.value != "select"){ return true; } } alert("Please rate atleast one attribute"); return false; }//if ends here

2492


What is unshift method in JavaScript?

962


What is the difference between innerhtml & innertext?

831


How we can get the value of an element using javascript?

926