write a pl/sql program to print the sum of numbers from 1 to 100 :
Code
DECLARE N NUMBER(3):=1; S NUMBER(4):=0; BEGIN WHILE N <=100 LOOP S:=S+N; N:=N+1; END LOOP; DBMS_OUTPUT.PUT_LINE('THE SUM OF 1 TO 100 IS '||S); END; /
output
THE SUM OF 1 TO 100 IS 5050 Statement processed.