Declare a integer :=&a; i integer; begin for i in 1 .. a loop if (mod(i,2)=0) then dbms_output.put_line('even '||i); -- else -- dbms_output.put_line('odd '||i); end if; end loop; end; /
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter