Showing posts with label Factorial. Show all posts
Showing posts with label Factorial. Show all posts

Tuesday, February 23, 2016

Factorial

set serveroutput on;
declare
i number(5);
j number (5);
f number(10);
begin
i:=&i;
f:=1;
for j in 1..i
loop
f:=f*j;
end loop;
dbms_output.put_line('Factorial of '||i|| ' is '  ||f);
end;
/