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
java pgm for reads a file(text file) and removes all the spaces then the text and write this back into the same file. e.g: (Input) _______ chennai is fourth biggest city in india. (output) _______ chennaiisfourthbiggestcityinindia.
What is escape & unescape String functions in JavaScript?
Explain the difference between javascript and an asp script.
What are the main features of javascript?
Explain the terms synchronous and asynchronous code?
Which is better python or javascript?
What does double mean in javascript?
What makes a relation a function?
What does a typeof operator do?
What is a closure javascript?
How do you round a value in javascript?
What is the difference between window.onload and ondocumentready?
what is the difference between window & document in javascript?
Define anonymous function.
What is variable typing?