Answer to Question #258948 in Databases | SQL | Oracle | MS Access for Tarurendra Kushwah

Question #258948

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


1
Expert's answer
2021-11-05T17:28:17-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS