public static Frac operator !(Frac a) { Frac res = new Frac(a.Denominator, a.Numerator); res.Fix(); return(res); }
static void Main(string[] args) { Frac a = new Frac(1, 2); //Frac g = new Frac(1.7); Frac r = 1 + a + a + 2; Console.WriteLine(r); }
public static Frac operator /(Frac a, Frac b) { Frac res = a * !b; res.Simlify(); res.Fix(); return(res); }
public static Frac operator *(Frac a, Frac b) { Frac res = new Frac(a.Numerator * b.Numerator, b.Denominator * a.Denominator); res.Simlify(); res.Fix(); return(res); }