RosettaCodeData/Task/Long-multiplication/M2000-Interpreter/long-multiplication.m2000
2025-02-27 18:35:13 -05:00

18 lines
412 B
Text

function placecoma(a as string) {
if len(a)<4 then =a :exit
k=StrRev$(a)
a=""
for i=4 to len(k) step 3
a+=mid$(k,i-3, 3)+","
next
a+=mid$(k, i-3)
a=strrev$(a)
if left$(a,1)="," then =mid$(a,2) else =a
}
a=bigInteger("2")
'method a, "intpower", biginteger("128") as a
method a, "intpower", biginteger("64") as a
method a, "multiply", a as a
with a,"tostring" as a.tostring
Print placecoma(a.tostring)