Factorial in ARIBAS

Example for versions ARIBAS 1.53

This example uses built-in factorial function.

ARIBAS uses integer type for variables by default, so type declaration can be omitted.

group(0) is used to cancel digit groups separation by underscores during output.

function fac0_16();
var n;
begin
    for n := 0 to 16 do
        writeln(n, "! = ", factorial(n): group(0));
    end;
end;

fac0_16().