While17. An integer N (> 0) is given. Using the integer division and taking the remainder of the division  operation, print all of its digits starting with the rightmost one (the digit of the units).

Solution in Python 3:

import random

N = random.randrange(1,10000000)
print("N = ",N)
q = N
while q >= 1:
r = q % 10
print(r,end="; ")
q = int(q/10)