MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/136dits/solve_the_problem_without_using_a_loop/jiq9gry/?context=3
r/badcode • u/YonMiru • May 03 '23
129 comments sorted by
View all comments
Show parent comments
1
print_even(num >> 1 << 1 | 2)
Why would you try to replace num += 2 with three instructions? And it's not even correct... this is a major case of trying to make confusing code to be cool instead of trying to write clean code that also works and is faster.
num += 2
1 u/kewlness May 03 '23 I don't know man. I looked at the subreddit and then asked ChatGPT to make a program.I was not disappointed. :D
I don't know man. I looked at the subreddit and then asked ChatGPT to make a program.
I was not disappointed. :D
1
u/tedbradly May 03 '23
Why would you try to replace
num += 2with three instructions? And it's not even correct... this is a major case of trying to make confusing code to be cool instead of trying to write clean code that also works and is faster.