added ex 1.2
This commit is contained in:
parent
49b921a814
commit
1958945053
13
src/Lesson1/ex_1.2.sc
Normal file
13
src/Lesson1/ex_1.2.sc
Normal file
@ -0,0 +1,13 @@
|
||||
def and(a: Boolean, b: Boolean): Boolean = if (a) b else false
|
||||
|
||||
def or(a: Boolean, b: Boolean): Boolean = if (a) true else b
|
||||
|
||||
and(false, false)
|
||||
and(false, true)
|
||||
and(true, false)
|
||||
and(true, true)
|
||||
|
||||
or(false, false)
|
||||
or(false, true)
|
||||
or(true, false)
|
||||
or(true, true)
|
Loading…
x
Reference in New Issue
Block a user