subroutine tidiv()
    integer(4) nx,x(0:999),ny,y(0:999),nq,q(0:999),nr,r(0:999)
    data nx/19/
    data ny/10/
    data x(0:19)/1,9*0,8,9*9/
    data y(0:9) /10*9/
    call idiv(nx,x,ny,y,nq,q)
    print 102,"q=",q(0:nq)
    print 102,"r=",x(0:nx)
102 format(A,(30I3))
90  read(*,*)
end