public void Main() { bool exit = false; while (!exit) { string command = Console.ReadLine(); string[] commands = command.Trim().ToLower().Split(" "); switch (commands[0]) { case "add": Console.WriteLine(commands[1] + commands[2]); break; case "subtract": Console.WriteLine(commands[1] - commands[2]); break; case "multiply": Console.WriteLine(commands[1] * commands[2]); break; case "divide": Console.WriteLine(commands[1] / commands[2]); break; case "exit": exit = true; break; } } }