20 lines
431 B
Plaintext
20 lines
431 B
Plaintext
OPTION COLLAPSE TRUE
|
|
OPTION DELIM ","
|
|
|
|
csv$ = LOAD$("data.csv")
|
|
|
|
DOTIMES AMOUNT(csv$, NL$)
|
|
line$ = TOKEN$(csv$, _, NL$)
|
|
|
|
IF _ = 1 THEN
|
|
total$ = APPEND$(line$, 0, "SUM")
|
|
ELSE
|
|
line$ = CHANGE$(line$, _, STR$(_*10) )
|
|
total$ = APPEND$(total$, 0, line$, NL$)
|
|
total$ = APPEND$(total$, 0, STR$(LOOP(i, AMOUNT(line$), VAL(TOKEN$(line$, i)))) )
|
|
FI
|
|
DONE
|
|
|
|
SAVE total$ TO "data.csv"
|
|
PRINT total$
|