Re:Printing 1 to 1000 without loop or conditionals
by juiceandjuice on Monday January 03, 2011 @01:47AM
(#2062398)
Actually the one that uses function pointers is by far the best, simplest way, and it doesn't segfault. Since x/1000 will always be floor(x/1000), once it reaches 1000 it calls nothing and exits cleanly.
This one (not mine):