Write a PL/SQL program to find greatest of three numbers and print Fibonacci series up the largest number found.
declare
x number := 0;
y number := 1;
temp number;
n number := 10;
i number;
begin
dbms_output.put_line('The fibbanoci series is given below :');
dbms_output.put_line(a);
dbms_output.put_line(b);
for i in 2..n
loop
temp:= x + y;
x := y;
y := temp;
dbms_output.put_line(temp);
end loop;
end;
Comments
Leave a comment