From 016e1dad13f04a71958b4e3d41dd99bfced68d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Baltaz=C3=A1r=20Radics?= Date: Wed, 16 Sep 2020 13:26:23 +0200 Subject: [PATCH] Add tasks --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76e8949..a2d5ed4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Logic operations, branching - +1. Declare three Boolean variables: `a`, `b` and `c`. Assign the logic values `true`, `true` and `false`, respectively. Display `a AND b`, `a OR b`, `a AND c`, `a OR (b AND c)`, `(a OR b) AND c`, `c XOR b`, `a XOR b`. Use the format `"a XOR c = TRUE"`. Check your results with truth tables. +2. Let the Boolean variable a be `TRUE`. Ask the user to type in a `0` or `1` and let the Boolean variable `b` have values `FALSE` or `TRUE` based on the input. Display `a AND b`, `a OR b`, `a XOR b` in the format used in exercise 1. +3. Ask for a number from the user. Write whether the number is divisible by `2`, `3` and `4` (you may make use of the property of divisions that they may have different results when using integers or doubles, but other methods are allowed as well). \ No newline at end of file