Showing posts with label Sum of 10 numbers. Show all posts
Showing posts with label Sum of 10 numbers. Show all posts

Monday, February 29, 2016

Sum of 10 numbers

set serveroutput on;
Declare
a number(4);
s number:=0;
Begin
a:=1;
loop
s:=s+a;
exit when(a=10);
a:=a+1;
end loop;
dbms_output.put_line('Sum of 10 numbers = '||s);
end;
/