Exercise 3

PHOTO EMBED

Thu Sep 23 2021 00:23:13 GMT+0000 (UTC)

Saved by @kaveen

-- Using for loop method 1
 
DECLARE
BEGIN
	<<i_loop>> for i in reverse 1..9 loop
    	<<j_loop>> for j in  1..9 loop
        	dbms_output.put(i);
			exit j_loop when j = i;
		end loop;
		dbms_output.new_line;
	END LOOP;
END;
 
--Using for loop method 2
DECLARE
BEGIN
	<<i_loop>> for i in reverse 1..9 loop
    	<<j_loop>> for j in  1..i loop
        	dbms_output.put(i);
		end loop;
		dbms_output.new_line;
	END LOOP;
END;
 
-- using while loop
content_copyCOPY