PL/SQL program to generate Fibonacci series
DECLARE
a number;
b number;
c number;
num number;
BEGIN
num:=&enter; -- To take input from the user
a :=0;
b :=1;
c :=0;
for i in 1..num
LOOP
dbms_output.put_line(c);
c :=a+b;
a :=b;
b :=c;
END LOOP;
END;
No comments:
Post a Comment