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

Can webassembly replace javascript?

998


What is a null variable?

973


Do hackers use javascript?

960


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

1033


What is local scope in javascript?

1066


What does two exclamation marks mean in javascript?

1044


What is a scope in javascript?

969


How we can add title of the page by javascript?

1134


In Java coding we will write a public static void main()? Why won't we write as a static public void main()

2669


How to achieve inheritance in javascript?

1046


Explain the for-in loop?

966


What is event bubbling in JavaScript?

1054


What is the difference between .call() and .apply()?

1069


How to get value from a textbox?

1205


Which javascript framework is in demand?

1085