Write a program to check whether a given number is a
palindrome or not?
Answer Posted / riddhi
<html>
<head>
<script language="Javascript">
var a;
</script>
<title> Number Palindrom </title>
</head>
<body>
<script Language="Javascript">
var rno=0;
var r=0;
var no = prompt("Enter First no: ","10");
var ono = parseInt(no);
while (no>0)
{
r = parseInt(no%10);
rno = parseInt((rno*10)+r);
no = parseInt(no/10);
}
document.write(rno);
if(rno == ono)
{
document.write(ono+" is palindrom number..");
}
else
{
document.write(ono +" is not palindrom number..");
}
</script>
</body>
</html>
Is This Answer Correct ? | 72 Yes | 39 No |
Post New Answer View All Answers
Which keyword is used to print the text in the screen?
What does 3+4+"7" evaluate to?
How to get the type of arguments passed to a function?
What are the ways of making comments in javascript?
What is the difference between remove() and removeChild()?
How to accessing elements using javascript?
all possible test cases for normal number field,name field date field,check box,
How to count the number of element in an array using javascript?
Please write the Code of simple javascript calculator withot eval() function
What is an object in javascript, give an example?
Which javascript is best?
To set all checkboxes to true using javascript?
Explain hoisting in javascript?
What are the valid scopes of a variable in JavaScript?
What is built in function in javascript?