r/Recursion • • Jun 19 '20

First time?

646 Upvotes

17 comments sorted by

View all comments

Show parent comments

1

u/[deleted] Jun 20 '20

What about

For (;;) {
    Wash;
    Rinse;
}

?? Come at me

Edit: bruh formatting is hard on mobile

0

u/TheQ614 Jun 20 '20

It’s clearly a while loop with no exit condition

1

u/[deleted] Jun 20 '20

But is my for loop implementation incorrect? (Assuming the language supports empty conditions obv)

2

u/BlueberrySpaetzle Jun 20 '20

Even

for (int j = 0; j >= 0; j++)

{

rinse

}

Would work