diveuc.py

Created by jilsaint90

Created on November 02, 2021

255 Bytes


def diveuc(a,b):
    r = a
    q = 0
    
    if a > 0:
        while r >= b:
            r = r - b
            q += 1

        return(q,r)
    
    elif a < 0:
        while r <= b:
            r += b
            q -= 1

        return(q,r)