Hacker News new | ask | show | jobs
by gmantastic 4617 days ago
Addition and comparison will suffice: https://gist.github.com/garethjwilliams/7202128
1 comments

Awesome solution, but it breaks if you change the iteration range.
Yeah, you're stuck with counting up from 1, although you could tweak it to suppress the output prior to a starting point.
Here is my C solution for arbitrary positive range: http://ideone.com/a0EdtS
Nice, I get it. Here's mine tweaked - not so clever: https://gist.github.com/garethjwilliams/7210264