diff options
Diffstat (limited to '1553/CH6/EX6.11/6Ex11.sce')
-rw-r--r-- | 1553/CH6/EX6.11/6Ex11.sce | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/1553/CH6/EX6.11/6Ex11.sce b/1553/CH6/EX6.11/6Ex11.sce new file mode 100644 index 000000000..ac0dfaa36 --- /dev/null +++ b/1553/CH6/EX6.11/6Ex11.sce @@ -0,0 +1,13 @@ +//chapter 6 Ex 11
+
+clc;
+clear;
+close;
+n=39; avg39=15;//average of 39 students
+inc=3/12; //months converted to years
+avg40=avg39+inc;
+Sum39=avg39*n;
+Sum40=avg40*(n+1);
+teacherAge=Sum40-Sum39;
+mprintf("The age of teacher is %d years",teacherAge);
+
|