PL SQL - sum of numbers from 1 to 100

-- This PL SQL program is used to find the sum of first 100 numbers.


declare
i number(10);
n number(10);
begin
n:=0;
i:=1;
while i<100
loop
n:=n+i;
i:=i+1;
end loop;
dbms_output.put_line('Sum is:'||n);
end;

Output
sum of first 100 PL SQL