Calculate factorials under these requirements

• Write a function factorial to compute the factorial n! for any integer n.
• The input should be the number n and output should be n!.
• You might have to use a for loop or a while loop to do this.

Answers (0)

This question is closed.

Asked:

on 29 Oct 2020

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!