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
List some of the advantages of javascript.
What do you mean by ide?
What is the difference between typeof and instanceof operators in Javascript?
Entire content of a JavaScript source file in a function block?
How to create array in JavaScript?
What are the limitations of javascript?
Public Static Void Main(String args[]) { System.out.in("Hai.."); } In the above code why string args[] is required.... If we are not giving command line argument..
What is the function of javascript?
What is difference between scripting and programming?
In Javascript are calculations with fractional numbers guaranteed to be precise?
What is decodeuri() in javascript?
What is the use of spread operator?
Describe negative infinity in javascript?
what is flux in javascript?
What does it mean in javascript?