function y = fact_for(x)
% FACT_FOR Calculates the factorial using a for loop
%   y = fact_for(x)
%
%   x: a possitive integer
%   y: x's factorial

% Initialize y
y = 1;

% Do the loop
for I = 1:x
    y = y*I;
end