diff options
author | Oskar <[email protected]> | 2024-08-22 20:07:49 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-08-22 20:07:49 +0200 |
commit | 5e6954e218455d912686f9adda25ddcd09ca267c (patch) | |
tree | 592778f24dd6d29ee23fd8682373b50728266263 /4p33.cpp | |
parent | 456ce2efc1a2f14cdaa853ec9a95945a77ff2a08 (diff) |
difficult exercise
Diffstat (limited to '4p33.cpp')
-rw-r--r-- | 4p33.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -4,7 +4,7 @@ * * 4.33 * - * + * Wow this might have been the trickiest question ever. I'm still not even sure if i totally get it! */ int main () { @@ -13,11 +13,9 @@ int main () { int res; int x = 1; int y = 1; - // (sameValue ? (++x, ++y) : --x), --y - res = someValue ? ++x, ++y : --x, --y; + res = (someValue ? (++x, ++y) : --x), --y; std::cout << res << " res"<< std::endl; std::cout << x << " x" << std::endl; std::cout << y << " y" << std::endl; - return 0; } |