#include "Fraction.h" #include "main.h" void main() { // // 2-fractions operation. // Fraction fract_big,fract1(0,1,2),fract2(0,1,4); fract_big=fract1+fract2; // =========================================== // // (fraction - right hand int) operations // Fraction fract3(2,3,4), fract_sum, fract_assign; fract_sum=fract3+13; fract_assign=14; // // (fraction - left hand int) operations // Fraction fract_left(1,2,3), fract_sum_left; // STATIC_DOWNCAST int itmp; itmp=gcd(24696,5292); // 1764=2^2 * 3^2 * 7^2 //24696=2^3* 3^2 * 7^3, 5292=2^2 * 3^3 * 7^2 itmp=gcd(8,12); Fraction fract_noreduced(1,7,4), fract_result; fract_result=fract_noreduced.reduce(); int x=17; } // ================================================= // // Euclid int gcd(int num1, int num2) { // There are two numbers - to find the // gcd - Greatest Common Divisor // int result; int id1, id2; int id2_old; int residual; int i; // The index - counter. id1=num1; id2=num2; if(num1