Program a Boolean function

Report a typo

Write a program that reads three boolean variables x, y, and z (each on a separate line) and then prints the result of the following logical expression: NOT(x AND y) OR (z).

Sample Input 1:

true
true
false

Sample Output 1:

false

Sample Input 2:

true
false
true

Sample Output 2:

true
Write a program in Kotlin
fun main() {
val x = readLine().toBoolean() // read other values in the same way
// write your code here
}
___

Create a free account to access the full topic