function result = factorial_forLoop(n)
% input: a number 
% output: factorial of the number n
% This function is implemented in an iterative way (i.e. with loops)

result = 1;

for i = 1:n
   result = result * i ;
end
