Search For

Armstrong Number or Not

Flag Hide Line Nos
Flagging a Snippet, takes the snippet to Moderator Attention;


-1
//Armstrong Number Program
<html>
<head><TITLE></TITLE>
<script language="JavaScript">
var e,x,d=0;
var b=prompt("Enter a number");
x=b;
while(z>0)
{
e=x%10;
d=d+(e*e*e);
x=parseInt(x/10);
}
if(b==d)
alert("given no is amstrong number");
else
alert("given no is not an amstrong number");
</script>
</head>
<body></body>
</html>