PROGRAM IN JAVASCRIPT FOR FIBONACCI SERIES

<html>
<body>
<script type="text/javascript">
var a=0,b=1,c;
document.write("Fibonacci");
while (b<=10)
{
document.write(c);
document.write("<br/>");
c=a+b;
a=b;
b=c;
}
</script>
</body>
</html>

No comments:

Post a Comment