Objective
Implement a function that divides a by b and writes the quotient and the remainder through q and r, choosing the pair whose remainder is never negative.
Steps
$ div_mod_floor(7, 2, &q, &r)
3 1
$ div_mod_floor(-7, 2, &q, &r)
-4 1
$ div_mod_floor(7, -2, &q, &r)
-3 1
$ div_mod_floor(-1, 5, &q, &r)
-1 4
$ div_mod_floor(-8, -4, &q, &r)
2 0
Expected files
Allowed functions
None. Write every helper yourself.

Objective
Implement a function that divides a by b and writes the quotient and the remainder through q and r, choosing the pair whose remainder is never negative.
Steps
$ div_mod_floor(7, 2, &q, &r)
3 1
$ div_mod_floor(-7, 2, &q, &r)
-4 1
$ div_mod_floor(7, -2, &q, &r)
-3 1
$ div_mod_floor(-1, 5, &q, &r)
-1 4
$ div_mod_floor(-8, -4, &q, &r)
2 0
Expected files
Allowed functions
None. Write every helper yourself.

Tests
Run the tests to grade your code