示例#1
0
        public static void Add(double firstNumber, char operater)
        {
            try
            {
                double addFirst  = firstNumber;
                double addSecond = AskUserForNumbers.AskUserForNumberTwo(firstNumber, operater);

                double result = addFirst + addSecond;

                Result.ResultValue(result);
                UserChoices.AdditionContinuation(result);
            }
            catch (Exception)
            {
                Program.DisplayMessage("\nSomething went wrong. Please try again", ConsoleColor.Red);
            }
        }
示例#2
0
        public static void AddLoop(double result)
        {
            try
            {
                char operater = '+';

                double addThird = AskUserForNumbers.AskUserForNumberTwo(result, operater);

                result += addThird;

                Result.ResultValue(result);
                UserChoices.AdditionContinuation(result);
            }
            catch (Exception)
            {
                Program.DisplayMessage("\nSomething went wrong. Please try again", ConsoleColor.Red);
            }
        }