summaryrefslogtreecommitdiff
path: root/3808/CH8/EX8.3/Ex8_3.sce
diff options
context:
space:
mode:
Diffstat (limited to '3808/CH8/EX8.3/Ex8_3.sce')
-rw-r--r--3808/CH8/EX8.3/Ex8_3.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/3808/CH8/EX8.3/Ex8_3.sce b/3808/CH8/EX8.3/Ex8_3.sce
new file mode 100644
index 000000000..9a46b434c
--- /dev/null
+++ b/3808/CH8/EX8.3/Ex8_3.sce
@@ -0,0 +1,12 @@
+//Chapter 08: Advanced Counting Techniques
+
+clc;
+clear;
+
+A=int(1000/7) //set of positive integers not exceeding 1000 and divisible by 7 Note:inferred from Example 2 of Section 4.1
+B=int(1000/11) //set of positive integers not exceeding 1000 and divisible by 11 Note:inferred from Example 2 of Section 4.1
+AIB=int(1000/(7*11)) //set of positive integers not exceeding 1000 and divisible by 7 also 11
+
+AUB=A+B-AIB
+
+mprintf("There are %d positive integers not exceeding 1000 that are divisible by either 7 or 11",AUB)