Fairshare between two and more: Difference between revisions

Content added Content deleted
No edit summary
Line 693:
{{trans|Cowgol}}
<syntaxhighlight lang="easylang">
procfunc fairshare ind base . r .
r = 0
while ind > 0
r = r += ind mod base
ind = ind div base
.
r = r mod base
return r
.
proc sequence n base . .
write base & ": "
for ind range0 n
callwrite (fairshare ind base) r& " "
write r & " "
.
print ""
.
call sequence 25 2
call sequence 25 3
call sequence 25 5
call sequence 25 11
</syntaxhighlight>