Barclays Interview Question

Write a function to resolve n!