Work Effects interview question

Can you solve a mathematical equation using an iterative and recursive approach using programming?