Tuesday, 10 July 2012

Fibbonacci Series

Declare
x number;
y number;
z number;
ctr number;
q number;

begin
q:=&q;
x:=0;
y:=1;
ctr :=2;
dbms_output.put_line('........FIBBONACCI SERIES........'||sysdate);
dbms_output.put_line(x);
dbms_output.put_line(y);
for ctr in 1..q
loop
z:=x+y;
dbms_output.put_line(z);
x:=y;
y:=z;
end loop;
end;

No comments:

Post a Comment