On the one hand, I agree with you.  I&#x27;ve never had to solve a program like this and I doubt I ever will.  On the other hand, I do understand the theory behind asking it in an interview.<p>Imagine that you&#x27;re interviewing a prospective player for a football team.  As a test, you ask the player to climb a single flight of stairs in a minute.  Now, this is obviously a stupid test.  There are no stairs on a football field.  David Beckham never won a game by being the first guy to the top of a flight of stairs.  No play will ever involve the player climbing stairs.<p>Yet, despite all that, I wouldn&#x27;t hire someone who, after sixty seconds, was only sitting half-way up the stairs, panting for breath.<p>Now, whether the primes problem is similarly a trivial task that any competent program can effortlessly solve is a matter for debate.