summaryrefslogtreecommitdiff
path: root/1553/CH6/EX6.3/6Ex3.sce
diff options
context:
space:
mode:
Diffstat (limited to '1553/CH6/EX6.3/6Ex3.sce')
-rw-r--r--1553/CH6/EX6.3/6Ex3.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/1553/CH6/EX6.3/6Ex3.sce b/1553/CH6/EX6.3/6Ex3.sce
new file mode 100644
index 000000000..9a1c43b76
--- /dev/null
+++ b/1553/CH6/EX6.3/6Ex3.sce
@@ -0,0 +1,12 @@
+//chapter 6 Ex 3
+
+clc;
+clear;
+close;
+a=[];
+for i=1:20
+ a(i)=7*i;
+end
+Sum=sum(a);
+Average=Sum/size(a,"r");
+printf("The average of first 20 multiples of 7 is %3.2f",Average);