Objective
Reduce the fraction held in r in place by dividing num and den by their greatest common divisor, with the sign carried by num so den ends up strictly positive.
Steps
$ rational_reduce(&r) with r = {6, 8}
3/4
$ rational_reduce(&r) with r = {42, -14}
-3/1
$ rational_reduce(&r) with r = {-6, -8}
3/4
$ rational_reduce(&r) with r = {0, -9}
0/1
Expected files
Allowed functions
None. Write every helper yourself.

Objective
Reduce the fraction held in r in place by dividing num and den by their greatest common divisor, with the sign carried by num so den ends up strictly positive.
Steps
$ rational_reduce(&r) with r = {6, 8}
3/4
$ rational_reduce(&r) with r = {42, -14}
-3/1
$ rational_reduce(&r) with r = {-6, -8}
3/4
$ rational_reduce(&r) with r = {0, -9}
0/1
Expected files
Allowed functions
None. Write every helper yourself.

Tests
Run the tests to grade your code