PROGRAM psifia
  IMPLICIT NONE

  INTEGER :: n, digit
  
  DO 
     PRINT *, "Dose thetiko akeraio"
     READ *, n
     IF (n > 0) EXIT
     PRINT *, "Edoses akeraio oxi thetiko"
  END DO
  

  DO 
     digit = MOD(n,10)
     PRINT *, digit
     n = n/10
     IF (n == 0) EXIT
  ENDDO

END PROGRAM psifia
