will you mind putting the full source code please?
I also want to know how to get the lowest term of a fraction.