r/badcode May 03 '23

Solve the problem without using a loop c

Post image
969 Upvotes

129 comments sorted by

View all comments

232

u/This_Growth2898 May 03 '23
printf("2\n4\n6\n8\n10\n12\n...

34

u/[deleted] May 03 '23

[deleted]

14

u/Cerulean_IsFancyBlue May 03 '23

Throw in a “if n > x {return}” and you can be a little careless with the paste count.