index | submit | rank | book

bool-and-or – Conjunction and disjunction

Write a program that reads several and/or conjunction/disjunction operations and prints their result.

Input will consist of several lines each containing a boolean p, an operator x and a boolean q separated by a single space. Booleans p and q are either of the strings true or false and the operator x is either of the strings and or or. Output should contain a line with the result of the given input operation.

Example input

true and false
false or true

Example output


The submitted program should contain the conjunction and disjunction functions that receive two boolean as arguments and return a boolean. Please refer to the information for the chosen language:


try first: bool-not swap

try next: timetable discount

index | submit | rank | book

Copyright © 2020-2021 Rudy Matela
All rights reserved