RosettaCodeData/Task/Combinations/EasyLang/combinations.easy

16 lines
225 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
n = 5
m = 3
len result[] m
#
proc combinations pos val . .
2023-09-16 17:28:03 -07:00
if pos <= m
for i = val to n - m
result[pos] = pos + i
combinations pos + 1 i
.
else
print result[]
.
2023-07-01 11:58:00 -04:00
.
2023-09-16 17:28:03 -07:00
combinations 1 0