public static void Multi(double firstNumber, char operater) { double multiSecond = AskUserForNumbers.AskUserForNumberTwo(firstNumber, operater); double result = firstNumber * multiSecond; Result.ResultValue(result); }
public static void Sub(double firstNumber, char operater) { try { double subSecond = AskUserForNumbers.AskUserForNumberTwo(firstNumber, operater); double result = firstNumber - subSecond; Result.ResultValue(result); UserChoices.SubtractionContinuation(result); } catch (Exception) { Program.DisplayMessage("\nPlease try again", ConsoleColor.Red); } }
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); } }
public static void SubLoop(double result) { try { char choice = '-'; double subThird = AskUserForNumbers.AskUserForNumberTwo(result, choice); result -= subThird; Result.ResultValue(result); UserChoices.SubtractionContinuation(result); } catch (Exception) { Program.DisplayMessage("\nSomething went wrong. Please try again!", ConsoleColor.Red); } }
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); } }