aUCBLogo Demos and Tests / sumnumberstest2
to sumnumberstest2
;by Mike Sandy (adapted to aUCBLogo for speed and brevity by AM)
local [start t v]
make "start timemilli
make "v sum_num 5 1 1E7
make "t (timemilli-:start)
print (list "sum\ of\ digits\ = :v
"time\ = int :t/60000 "min
60 * (:t/60000-int :t/60000) "sec )
end
to sum_num :b :n1 :n2 [:s 0]
if :n1 > :n2 [output :s]
output (sum_num :b :n1+1 :n2 :s+(0+tolist intform :n1 0 :b))
end