Aim - PL/SQL program to generate Fibonacci series.
PLSQL Sample Program: -
declare
f1 number(3);
f2 number(3);
f3 number(3);
num number(3);
begin
f1:=0;
f2:=1;
f3:=0;
num:=1;
while num<=10
loop
dbms_output.put_line(f3);
f1 :=f2;
f2:=f3;
f3:=f1+f2;
num:=num+1;
end loop;
end;
Output of PL SQL Block: -
0
1
1
2
3
5
8
13
21
34
Dont SPAM