
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.
rational_reduce(&r) with r = {6, 8}3/4rational_reduce(&r) with r = {42, -14}-3/1rational_reduce(&r) with r = {-6, -8}3/4rational_reduce(&r) with r = {0, -9}0/1rational_reduce.c
Run the tests to grade your code
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.
rational_reduce(&r) with r = {6, 8}3/4rational_reduce(&r) with r = {42, -14}-3/1rational_reduce(&r) with r = {-6, -8}3/4rational_reduce(&r) with r = {0, -9}0/1rational_reduce.c
Run the tests to grade your code
Memory will appear here