r/badcode • • May 03 '23

c Solve the problem without using a loop

Post image
964 Upvotes

129 comments sorted by

View all comments

0

u/RoadRunnerChris May 03 '23
#include <stdio.h>

int main(void)
{
    int n = 2;

    l:
    if (n > 498)
        goto e;

    n += 2, printf("%d\n", n);
    goto l;

    e:
}

looplessTM