make a function that would imitate basic calculator functions
public static void Calculator(int first, int second, string myOperator) { int result = 0; switch (myOperator) { case "+": result = first + second; break; case "-": result = first - second; break; case "*": result = first * second; break; case "/": result = first / second; break; case "^": result = first ^ second; break; default: Console.WriteLine("Invalid input!"); break; } Console.WriteLine("Result: {0}", result); }