begin
for v_counter in 0..10 loop
if mod(v_counter,2)=0 then
dbms_output.put_line('v_counter='||v_counter);
end if;
end loop;
dbms_output.put_line('Done...');
end;
begin
for v_counter in reverse 0..10 loop
if mod(v_counter,2)=1 then
dbms_output.put_line('v_counter='||v_counter);
end if;
end loop;
dbms_output.put_line('Done..');
end;
*******outputs********
v_counter=0
v_counter=2
v_counter=4
v_counter=6
v_counter=8
v_counter=10
Done...
v_counter=9
v_counter=7
v_counter=5
v_counter=3
v_counter=1
Done..
Comments
Post a Comment