--1>STATE THE OUTPUT
DECLARE
I NUMBER:=0;
BEGIN
LOOP
DBMS_OUTPUT.PUT_LINE('I='||I);
I:=I+1;
EXIT WHEN I>=11;
END LOOP;
END;
--2> STATE THE OUTPUT
DECLARE
NUM NUMBER(3):=123;
ANS NUMBER(3):=0;
I NUMBER(3):=0;
BEGIN
WHILE NUM != 0
LOOP
I:=MOD(NUM,10);
ANS:=(ANS*10)+I;
NUM:=FLOOR(NUM/10);
END LOOP;
DBMS_OUTPUT.PUT_LINE('REVERSE OF GIVEN NUMBER IS: '||ANS);
END;
DECLARE
I NUMBER:=0;
BEGIN
LOOP
DBMS_OUTPUT.PUT_LINE('I='||I);
I:=I+1;
EXIT WHEN I>=11;
END LOOP;
END;
--2> STATE THE OUTPUT
DECLARE
NUM NUMBER(3):=123;
ANS NUMBER(3):=0;
I NUMBER(3):=0;
BEGIN
WHILE NUM != 0
LOOP
I:=MOD(NUM,10);
ANS:=(ANS*10)+I;
NUM:=FLOOR(NUM/10);
END LOOP;
DBMS_OUTPUT.PUT_LINE('REVERSE OF GIVEN NUMBER IS: '||ANS);
END;