> Is it possible to make it without loops?
Gotta love the bone-headed assignments from clueless teachers.

What exactly is the point of these exercises?
It's not like you're going to reuse your new found skill (writing programs without loops) ever again.

11-09-2008

Garland

Perhaps he attends a class in functional programming

11-09-2008

RobotGymnast

errr.. depends how you define a loop.. you could just write the loop in assembly instead, but honestly I can't think of a way to do that.. think about how you as a human would try to solve a proble like that. Somebody gives you two numbers, you check each number to see if it's prime, and you continue doing so until you've done all the numbers. That's a loop; programming in ways that are different from how you think tends to be unproductive in my experience