NTT DATA Interview Question

In technical round i was asked to make a java program to calculate factorial without recursion......