Here you will get pl/sql program for fibonacci series.

It is a series in which next number is the sum of previous two numbers.

## PL/SQL Program for Fibonacci Series

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
declare first number:=0; second number:=1; third number; n number:=&n; i number; begin dbms_output.put_line('Fibonacci series is:'); dbms_output.put_line(first); dbms_output.put_line(second); for i in 2..n loop third:=first+second; first:=second; second:=third; dbms_output.put_line(third); end loop; end; / |

**Output**

*Enter value for n: 6*

*old 5: n number:=&n;*

*new 5: n number:=6;*

*Fibonacci series is:*

*0*

*1*

*1*

*2*

*3*

*5*

*8*

jitinwhy 2..n in above program

Jayanth R Sas we have already printed first and second number, we should use (3..n) to generate 5 terms(0 1 2 3 5).

Vasundhara KulkarniI want to print series 5,8,12,17,23…

Philip MaharaThanks for this program. This program is correct program.

BhargaviI need to create procedure to find Fibonacci series