Question #257612

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


Expert's answer

declare
fact number :=1;
num number := &1;
begin			
while num > 0 loop
fact:=num*fact;		
num:=num-1;		
end loop;	
dbms_output.put_line(fact);
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