GRP8

NAME 2: Cheng Wei Hong
=** Note: **=

=** Paste code into wiki instead of attaching file for DL. Pls follow instructions. **=

Complete source code

code format="cpp" fraction redox {   fraction y;    y.num = num; y.den = den;
 * Reduction algorithm**

for (int i = 2; i < num; i++) {       if (y.num % i == 0 && y.den % i == 0) {           do            { y.num = y.num/i; y.den = y.den/i; }           while (y.num % i == 0 && y.den % i == 0); }   }

return y; } code

code format="cpp" fraction A = A.redox; code
 * Implementation**