Polyndrome program Source Code
<html>
<head><TITLE></TITLE>
<script language="JavaScript">
var a=prompt("Enter a value");
var b,sum=0;
var z=a;
while(a>0)
{
b=a%10;
sum=sum*10+b;
a=parseInt(a/10);
}
if(sum==z)
{
alert("given no is polydrom");
}
else
{
alert("given no is not a polydrom");
}
</script>
</head>
<body></body>
</html>
0 comments:
Post a Comment