summaryrefslogtreecommitdiff
path: root/1034/CH1/EX1.10/example10.sce
diff options
context:
space:
mode:
Diffstat (limited to '1034/CH1/EX1.10/example10.sce')
-rwxr-xr-x1034/CH1/EX1.10/example10.sce14
1 files changed, 14 insertions, 0 deletions
diff --git a/1034/CH1/EX1.10/example10.sce b/1034/CH1/EX1.10/example10.sce
new file mode 100755
index 000000000..ab2dac68d
--- /dev/null
+++ b/1034/CH1/EX1.10/example10.sce
@@ -0,0 +1,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() \ No newline at end of file