Question #258948

Write a procedure and call it into main pl/sql program to find a factorial of a number.


Expert's answer

declare
n number;
factors number:= 1;
i number;
begin
n := &n;
for i in 1..n
loop
factors :=factors *i;
end loop;
 
dbms_output.put_line('factorial='||factors);
end;

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS