Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
24
Task/Logical-operations/Action-/logical-operations.action
Normal file
24
Task/Logical-operations/Action-/logical-operations.action
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
BYTE FUNC Not(BYTE a)
|
||||
IF a=0 THEN
|
||||
RETURN (1)
|
||||
FI
|
||||
RETURN (0)
|
||||
|
||||
PROC Main()
|
||||
BYTE a,b,res
|
||||
|
||||
FOR a=0 TO 1
|
||||
DO
|
||||
FOR b=0 TO 1
|
||||
DO
|
||||
res=a AND b
|
||||
PrintF("%B AND %B=%B",a,b,res)
|
||||
res=a OR b
|
||||
PrintF("|%B OR %B=%B",a,b,res)
|
||||
res=a ! b
|
||||
PrintF("|%B XOR %B=%B",a,b,res)
|
||||
res=Not(a)
|
||||
PrintF("|NOT %B=%B%E",a,res)
|
||||
OD
|
||||
OD
|
||||
RETURN
|
||||
Loading…
Add table
Add a link
Reference in a new issue