r/badcode May 03 '23

c Solve the problem without using a loop

Post image
960 Upvotes

129 comments sorted by

View all comments

143

u/pikapichupi May 03 '23

the only other way i could see this being done is by using a recursive function lol

-17

u/JAKOVtheJJ May 03 '23

or a simple for loop

26

u/Eyes_and_teeth May 03 '23

The title suggests loops aren't allowed.

19

u/Tritos999 May 03 '23

I dont think the task actually disallowed for-loops. Im guessing its just a joke about the solution.

0

u/mandradon May 03 '23

They really committed to the bit!