<!DOCTYPE html>
<html>
<head>
<title>fiboncci</title>
</head>
<body>
<script type="text/javascript">
var a=0,b=1,c,count;
n=window.prompt("Enter the value generate fibonci");
var num=parseInt(n);
document.writeln("<h1>Fiboncci sries for"+num+"terms</h1>");
count=1;
document.writeln(+a+"<br>"+b);
while(count<=num-2)
{
c=a+b;
document.write("<br>"+c+"<br>");
a=b;
b=c;
++count;
}
</script>
</body>
</html>
************************************Output************************************
Fiboncci sries for5terms
0
1
1
2
3
No comments
Welcome to saveracom.blogspot.com