From 3d0a78eaaafff660cd04adf23a6bec1721187abf Mon Sep 17 00:00:00 2001 From: Oskar Date: Sat, 17 Aug 2024 18:27:20 +0200 Subject: corrected condition comments, i had to exert some real brain power to untangle this in my head --- 4p12.cpp | 12 ++++++++---- 1 file 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; } -- cgit v1.2.3