diff options
Diffstat (limited to '3808/CH1/EX1.10/Ex1_10.sce')
-rw-r--r-- | 3808/CH1/EX1.10/Ex1_10.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/3808/CH1/EX1.10/Ex1_10.sce b/3808/CH1/EX1.10/Ex1_10.sce new file mode 100644 index 000000000..7dd0f0179 --- /dev/null +++ b/3808/CH1/EX1.10/Ex1_10.sce @@ -0,0 +1,26 @@ +//Chapter 01: The Foundations: Logic and Proofs + +clc; +clear; + +function atck(X) + if (X=='CS1') then + mprintf("\nA(%s) is true",X) + elseif (X=='MATH1') then + mprintf("\nA(%s) is true",X) + else + mprintf("\nA(%s) is false",X) + end +endfunction + +//Defining systems to check whether they are under attack through a function. +x1='CS1' +x2='CS2' +x3='MATH1' + +atck(x1) +atck(x2) +atck(x3) + +mprintf("\nSystems under attack are CS1 and MATH1.\nThe truth values for the same are calculated using functions.") + |