PL/SQL program for reverse of a number using procedure

In this example, you will write a PL/SQL program for the reverse of a number using a procedure

declare
no number;
procedure reverse(no in out number)
is
rev number:=0;
remainder number:=0;
begin
while no>0
loop
/* mod function is used to find remainder of number when you divided by 10 */
  remainder := mod(no,10);
  rev := rev * 10 + remainder;
  no := floor(no/10);
end loop;
dbms_output.put_line('reverse of number is '||rev);
end;
begin
/* & is used to read input from keyboard */
no:=&no;
reverse(no);
end;
/

output

Enter value for no: 1456
old  17: no:=&no;
new  17: no:=1456;
reverse of number is 6541