Fibonacci Series :
The following code describes about the Fibonacci series implemented in JavaScript with the JavaScript code implemented inside the HTML Tags :
<html>
<body>
<script type="text/javascript">
var a=0,b=1,c;
document.write("Fibonacci");
while (b<=7)
{
c=a+b;
a=b;
b=c;
document.write(c);
document.write("<br/>");
}
</script>
</body>
</html>
Output :
11
2
3
5
8
13
To know about the Fibonacci Series in detail and also to know the codes of the Fibonacci Series in various other programming languages Click Here
If the above link doesn't work go to this URL :
http://gappcode.blogspot.in/2013/11/fibonacci-series.html
No comments:
Post a Comment