Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Calculating Factorial by creating a procedure for it

807875Dec 9 2010 — edited Dec 9 2010
Hello Everybody
I was trying to create a procedure for the calculation of factorail of a number
but something is not going right
I hope you guys can lead to the correct path
here is my code
create or replace procedure factorial(n in number)
is 
           v number;
begin

       for i in reverse n..1
 loop
              v :=v*i;
end loop;
dbms_output.put_line(v);
end;
This post has been answered by Lokanath Giri on Dec 9 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2011
Added on Dec 9 2010
18 comments
19,038 views