Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE
- num NUMBER;
- rev NUMBER:=0;
- rem NUMBER;
- copy NUMBER;
- BEGIN
- num:=#
- copy:=num;
- WHILE num>0
- LOOP
- rev:=rev*10;
- rem:=MOD(num,10);
- rev:=rev+rem;
- num:=TRUNC(num/10);
- END LOOP;
- DBMS_OUTPUT.put_line('Reverse of '|| copy || ' is ' || rev);
- END;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement