Fibonacci series

an anonymous user · November 26, 2021 · SQL
declare
first number:=0;
second number:=1;
temp number;
n number;
i number;
begin;
dbms_output.put_line("fibanocci series is:");
dbms_output.put_line(first);
dbms_output.put_line(second);
for 1in 2...n
loop
temp=first+second;
first=second;
second=temp;
dbms_output.put_line(temp);
end loop;
end;
/





Comments

Please sign up or log in to contribute to the discussion.