Showing posts with label Fibonacci Series of N term. Show all posts
Showing posts with label Fibonacci Series of N term. Show all posts

Monday, February 29, 2016

Fibonacci Series of N term

set serveroutput on;
Declare
n number(4);
a number:=1;
b number:=1;
c number:=0;
Begin
n:=&n;
dbms_output.put_line('Fibonacci Series is : ');
for i in 1..n
loop
c:=a+b;
a:=b;
b:=c;
dbms_output.put_line(c);
end loop;
end;
/