Pergunta de entrevista da empresa Cognizant

Can you please write a factorial code