Basic Loop

Set serverouput on;

DECLARE
v_no  NUMBER := &no;
f NUMBER := 1;
n_temp NUMBER;
BEGIN
n_temp:= v_no;
loop
f:= f * v_no;
v_no   := v_no – 1;
exit when v_no=0;
end loop;
DBMS_OUTPUT.PUT_LINE(‘factorial of ‘ || n_temp ||’ is ‘ || f);
End;
/

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2023 MYBSCIT.com. An initiative by some failures to make student scholars.

or

Log in with your credentials

Forgot your details?