aboutsummaryrefslogtreecommitdiff
path: root/vendor/cmilan/test/factorial.mil
blob: c9e5e5070047762f1d478aed26bb9d8e40929a42 (plain)
1
2
3
4
5
6
7
8
9
10
BEGIN
  n := READ;
  factorial := 1;
  i := 1;
  WHILE i <= n DO
    factorial := factorial * i;
    i := i + 1
  OD;
  WRITE(factorial)
END