public void Execute(List <string> param) { var rationalParamsHandler = new RationalParamsHandler(); var rationals = rationalParamsHandler.Read(param); if (rationals != null) { Console.WriteLine(rationalParamsHandler.Operate(rationals, (x, y) => x.Sub(y))?.ToString()); } }
public void Execute(List <string> param) { var rationalParamsHandler = new RationalParamsHandler(); var rationals = rationalParamsHandler.Read(param); if (rationals != null) { var summ = rationalParamsHandler.Operate(rationals, (x, y) => x.DivideBy(y)); if (summ.HasValue) { Console.WriteLine(summ.Value.ToString()); } } }