This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/programming/code/factorialLoop.m

7 lines
86 B
Matlab

n = 5;
x = 1;
for i = 1:n
x = x * i;
end
fprintf('Faculty of %i is: %i\n', n, x)