Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Sum of n numbers
--Oracle 11g Express Edition --please drop objects you've created at the end of the script --or check for their existance before creating --'\\' is a delimiter declare type numarray IS VARRAY(5) OF INTEGER; it numarray; total number; sumarray number:=0; begin it := numarray(5,8,4,9,1); total := it.count(); for i in 1.. total loop sumarray := sumarray + it(i); end loop; dbms_output.put_line('Sum is ' || sumarray); end;
run
|
edit
|
history
|
help
0
2
Srinivas
testElham
add pl/sql
Srinivas
add of two num
Srinivas
neha
display table 5 for using for loop
Practice