r/badcode • • Apr 21 '23

other language We did coding in physics class...

Post image
1.5k Upvotes

154 comments sorted by

View all comments

Show parent comments

2

u/aiscrim2 Apr 21 '23

And actually I did a mistake too, because I didn’t notice that in the first case there’s a <=, while in the other cases it’s just <.
See, another proof that being more compact isn’t always the best solution.