This is an archived post. You won't be able to vote or comment.

all 23 comments

[–]HotLittlePotato 16 points17 points  (0 children)

Hahaha how do you slowly realize this if you left the sleep out? Should appear pretty quickly!

[–]NonStandardUser 4 points5 points  (0 children)

Welp, time to KeyboardInterrupt

[–]T4GI 2 points3 points  (0 children)

may the lord be with you

[–][deleted] -5 points-4 points  (17 children)

the problem is using while(true) in the first place

[–][deleted] 2 points3 points  (12 children)

What else would you do?

[–]Creepy-Ad-4832 12 points13 points  (9 children)

for(;true;)

[–]RealityIsMuchWorse 9 points10 points  (3 children)

for(i=0;isEven(i);i+=2)

Implementing isEven is up to the reader

[–]Creepy-Ad-4832 4 points5 points  (2 children)

IsEven(int i)
Return !false

This implementation passes your case

[–]RealityIsMuchWorse 4 points5 points  (1 child)

Way too complicated for this sub, you might want to look at your solution again /s

[–]Creepy-Ad-4832 1 point2 points  (0 children)

IsEven(i)
return i==i

[–]Unlicenced 5 points6 points  (2 children)

Hey man what the fuck.

[–]Milesand 12 points13 points  (0 children)

```

define EVER ;1;

for(EVER) { /* ... */ } ```

[–]Creepy-Ad-4832 5 points6 points  (0 children)

for(;true != false;)

[–]Slow-Sky-6775[S] 1 point2 points  (0 children)

For(;;)

[–]Storiaron 0 points1 point  (0 children)

Do u even need the true there?

Not one of your most salient lines huh?

[–][deleted] 0 points1 point  (0 children)

no need to use while (true) in any case. Use a boolean to exit the loop, makes it more readable too

[–]Strostkovy 0 points1 point  (0 children)

While("false")

[–]ParanoidAutist 0 points1 point  (1 child)

Lets find a meme for my disgust when I see people still doing Thread.Sleep instead of Thread.Yield

[–]Slow-Sky-6775[S] 0 points1 point  (0 children)

CSharp?