Dassault Systèmes Interview Question

Write a program using recursive as well as a non-recursive way to calculate the factorial.