Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
gmantastic
· 13y ago · 0 comments
Addition and comparison will suffice:
https://gist.github.com/garethjwilliams/7202128
Comments
[–]
deletes
13y ago
Awesome solution, but it breaks if you change the iteration range.
[–]
gmantastic
OP
13y ago
Yeah, you're stuck with counting up from 1, although you could tweak it to suppress the output prior to a starting point.
[–]
deletes
13y ago
Here is my C solution for arbitrary positive range:
http://ideone.com/a0EdtS
[–]
gmantastic
OP
13y ago
Nice, I get it. Here's mine tweaked - not so clever:
https://gist.github.com/garethjwilliams/7210264