Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,30 @@
Program Combinations;
const
m_max = 3;
n_max = 5;
var
combination: array [0..m_max] of integer;
procedure generate(m: integer);
var
n, i: integer;
begin
if (m > m_max) then
begin
for i := 1 to m_max do
write (combination[i], ' ');
writeln;
end
else
for n := 1 to n_max do
if ((m = 1) or (n > combination[m-1])) then
begin
combination[m] := n;
generate(m + 1);
end;
end;
begin
generate(1);
end.