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());
            }
        }
예제 #2
0
        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());
                }
            }
        }