set serveroutput on;
Declare
a number(4);
b number(4);
c number(4);
i number(4);
Begin
a:=0;
b:=1;
dbms_output.put_line('Fibonacci series: =' ||a||','||b);
i:=0;
while i<=7
loop
c:=a+b;
a:=b;
b:=c;
dbms_output.put_line(c);
i:=i+1;
end loop;
end;
/
Declare
a number(4);
b number(4);
c number(4);
i number(4);
Begin
a:=0;
b:=1;
dbms_output.put_line('Fibonacci series: =' ||a||','||b);
i:=0;
while i<=7
loop
c:=a+b;
a:=b;
b:=c;
dbms_output.put_line(c);
i:=i+1;
end loop;
end;
/
No comments:
Post a Comment