summaryrefslogtreecommitdiff
path: root/662/CH3/EX3.19
diff options
context:
space:
mode:
Diffstat (limited to '662/CH3/EX3.19')
-rwxr-xr-x662/CH3/EX3.19/ex3_19.sce16
1 files changed, 16 insertions, 0 deletions
diff --git a/662/CH3/EX3.19/ex3_19.sce b/662/CH3/EX3.19/ex3_19.sce
new file mode 100755
index 000000000..923ea2f6c
--- /dev/null
+++ b/662/CH3/EX3.19/ex3_19.sce
@@ -0,0 +1,16 @@
+ //Example 8.19
+ clc
+//Logical operator precedences
+
+i=int(7);
+f=5.5;
+c='w';
+
+z= i + f <= 10;
+disp(z, "(i + f <= 10)");
+
+z= i >=6 & c == 'w';
+disp(z, "(i >=6 & c == w)");
+
+z= c ~= 'p' | i+ f <=10;
+disp(z, "(c ~= p | i+ f <=10)");