summaryrefslogtreecommitdiff
path: root/1034/CH1/EX1.7/example7.sce
blob: ed8105fbc54d3fc96ec3d78d3426a4f913a25b10 (plain)
1
2
3
4
5
6
7
8
9
10
// To add a list of no. using array.
function[]=add(a)
    result=sum(a);

    printf("addition of no. on the list is=%d",result);
    funcprot(0);
endfunction
//calling routine
a=[5 2 7 8 9 4 6]
r=add(a)