<html>
<head>
<script language="vbscript" >
sub fact
s=1
x=eval(inputbox("Enter Number"))
if x>0 then
for i=1 to x
s=s*i
next
alert("Factorial For " & x & " = " & s)
else
alert ("Wrong Value")
end if
end sub
</script>
</head>
<body onload="fact()">
</body>
</html>
No comments:
Post a Comment