Untitled
unknown
plain_text
a year ago
280 B
9
Indexable
CREATE OR REPLACE function fact(num IN int)
return int
AS
f int;
begin
f:=1;
for i in 1..num loop
f:=f*i;
end loop;
return f;
end fact;
/
declare
num int:=&1;
res int;
begin
res:=fact(num);
dbms_output.put_line('FACTORIAL IS:'||res);
end;
/
Editor is loading...
Leave a Comment