OSIsoft Interview Question

Code a function to find the factorial