Antoni Gual's doesn't work when given a zero, better it's still better than mine.

I always thought you'd have to use an array/stack to start at the one's place and still print them in order - nice work!

Well, anyway, here's mine:

DEFLNG A-Z

INPUT "Enter a non-negative integer: ", n

divisor = 1000000000 ' start at the billions place

' LONGs cannot have any more digits than this

PRINT "Here are the digits, in order:";

' This flag will be used to clip off leading zeros:

havePrintedANonZeroDigit = 0

DO UNTIL divisor = 1

digit% = (n \ divisor) MOD 10

divisor = divisor \ 10

IF (digit% <> 0) OR havePrintedANonZeroDigit THEN

PRINT digit%; ",";

havePrintedANonZeroDigit = -1

END IF

LOOP

' This ensures that for n = 0, a zero will be printed:

PRINT n MOD 10 ' Print the last digit (in the one's place)

END