By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE OR REPLACE PROCEDURE fibos(n IN number) IS
first number := 0;
second number := 1;
temp number;
i number;
BEGIN
dbms_output.put_line('Series:');
dbms_output.put_line(first);
dbms_output.put_line(second);
for i in 2..n
loop
temp:=first+second;
first := second;
second := temp;
dbms_output.put_line(temp);
END loop;
END;
/
DECLARE
a number := 5;
BEGIN
fibos(a);
END;
/
1 rows affected