RosettaCodeData/Task/Van-der-Corput-sequence/EasyLang/van-der-corput-sequence.easy

18 lines
230 B
Text
Raw Permalink Normal View History

2023-09-16 17:28:03 -07:00
func vdc b n .
2023-07-01 11:58:00 -04:00
s = 1
while n > 0
s *= b
m = n mod b
v += m / s
n = n div b
.
2023-09-16 17:28:03 -07:00
return v
2023-07-01 11:58:00 -04:00
.
for b = 2 to 5
write "base " & b & ":"
for n range0 10
2023-09-16 17:28:03 -07:00
write " " & vdc b n
2023-07-01 11:58:00 -04:00
.
print ""
.