% David Fisher
% Jan 29, 2009
%
% Prints a factorial table

function factorialTable
clc
for i = 1:10
    a = calculateFactorial(i);
    fprintf('%2d! = %d\n',i,a);
end

function result = calculateFactorial(n)

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

