DECLARE
N NUMBER(2):=&N;
R NUMBER(2);
V VARCHAR2(1000);
BEGIN
WHILE N>0
LOOP
R:=MOD(N,8);
V:=R||V;
N:=TRUNC(N/8);
END LOOP;
DBMS_OUTPUT.PUT_LINE('OCTAL OF A GIVEN NUMBER IS '||V);
END;
/
N NUMBER(2):=&N;
R NUMBER(2);
V VARCHAR2(1000);
BEGIN
WHILE N>0
LOOP
R:=MOD(N,8);
V:=R||V;
N:=TRUNC(N/8);
END LOOP;
DBMS_OUTPUT.PUT_LINE('OCTAL OF A GIVEN NUMBER IS '||V);
END;
/
0 comments:
Post a Comment