summaryrefslogtreecommitdiff
path: root/4p12.cpp
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-08-17 18:27:20 +0200
committerOskar <[email protected]>2024-08-17 18:27:20 +0200
commit3d0a78eaaafff660cd04adf23a6bec1721187abf (patch)
treec92f021a2442b1d6d153d20173a1a36235c4ea31 /4p12.cpp
parentaa9b47d8f1a8b3fac4d80276401e6d0884edb86a (diff)
corrected condition comments, i had to exert some real brain power to untangle this in my head
Diffstat (limited to '4p12.cpp')
-rw-r--r--4p12.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/4p12.cpp b/4p12.cpp
index 74442e4..c59fb7b 100644
--- a/4p12.cpp
+++ b/4p12.cpp
@@ -4,18 +4,22 @@
*
* 4.12
*
- *
+ * These conditions make my head spin its actually so confusing to think about...
*/
int main () {
- int i = 1;
+ int i = 0;
int j = 9;
int k = 10;
+ // true == >0
+ // false == 0
+ // i != >0
+ // AKA
+ // i == 0
+ //then print ...
if(i != (j < k)) { // j < k is evaluated first
- // because j < k now it will return true
- // When 'i' is NOT true(aka NOT 0) then print below
std::cout << "..." << std::endl;
}