Untitled

mail@pastecode.io avatar
unknown
plain_text
4 years ago
290 B
3
Indexable
Never
DECLARE
 ret integer;
 n integer;
 cursor k is select cislo from cisla;
BEGIN
 open k;
 loop
 ret:=1;
 fetch k into n;
 exit when k%notfound;
  for i in 1..n loop
  ret:=ret*i;
  end loop;
 dbms_output.put_line(n ||' faktorial je roven ' || ret);
 end loop;
 close k;
END;