26 lines
434 B
Text
26 lines
434 B
Text
100 sub doub(a)
|
|
110 doub = a*2
|
|
120 end sub
|
|
130 sub half(a)
|
|
140 half = int(a/2)
|
|
150 end sub
|
|
160 sub iseven(a)
|
|
170 iseven = (a mod 2)-1
|
|
180 end sub
|
|
190 outp = 0
|
|
200 x = 17
|
|
210 y = 34
|
|
220 while 1
|
|
230 print x;chr$(9);
|
|
240 if not (iseven(x)) then
|
|
250 outp = outp - y
|
|
260 print y
|
|
270 else
|
|
280 print
|
|
290 endif
|
|
300 if x < 2 then exit while
|
|
310 x = half(x)
|
|
320 y = doub(y)
|
|
330 wend
|
|
340 print "=";chr$(9);outp
|
|
350 end
|