We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
PLsql:
set serveroutput on;
DECLARE
v_row NUMBER := 20;
v_col NUMBER;
BEGIN
FOR i IN REVERSE 1..v_row LOOP
v_col := i;
FOR j IN 1..v_col LOOP
DBMS_OUTPUT.PUT('* ');
END LOOP;
DBMS_OUTPUT.PUT_LINE('');
END LOOP;
END;
/
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Draw The Triangle 1
You are viewing a single comment's thread. Return to all comments →
PLsql: set serveroutput on; DECLARE v_row NUMBER := 20; v_col NUMBER; BEGIN FOR i IN REVERSE 1..v_row LOOP v_col := i; FOR j IN 1..v_col LOOP DBMS_OUTPUT.PUT('* '); END LOOP; DBMS_OUTPUT.PUT_LINE(''); END LOOP; END; /