summaryrefslogtreecommitdiff
path: root/1034/CH1/EX1.10/example10.sce
blob: ab2dac68de84238dfe75210237134646a9d89434 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
clear;
clc;
printf("\n Example 1.10");
// function to sum a list of numbers.
function[]=add()
    printf("\n no. in the list are");
    disp(a);
    x=sum(a);
    printf("\n Result=%d",x);
    funcprot(0);
    endfunction
    //calling routine.
    a=[2 5 6 7 9 1 6 3 7 45]
    add()