Preview:
declare
 a integer :=&a;
b integer:=0 ;
begin
fact(a,b);
dbms_output.put_line(b);
end;
/

create or replace procedure fact(n in integer,b  in out integer)
is 
 
begin
b:=1;
for i in 1..n loop
b:=b*i;

end loop;

end;
/

downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter