I'm doing this fraction arithmetic program, and have the following so far:

A Frac class with methods that allow for addition, subtraction, etc.

all of which crossmultiply for a common denominator, when necessary.

My problem is - I can't figure out how to code a function for reducing the results. I've got no idea what a systematic formula might look like. Could anyone help?

Oh, and I'm not supposed to use overloaded operators.