예제 #1
0
        static void Main(string[] args)
        {
            // The code provided will print ‘Hello World’ to the console.
            // Press Ctrl+F5 (or go to Debug > Start Without Debugging) to run your app.

            Calculator.CalculatorParser calc = new Calculator.CalculatorParser();

            calc.Parse("(1+2)*4");

            Console.WriteLine("Hello World!");
            Console.ReadKey();

            // Go to http://aka.ms/dotnet-get-started-console to continue learning how to build a console app!
        }
예제 #2
0
        static void Main(string[] args)
        {
            var parser = new Calculator.CalculatorParser();

            do
            {
                Console.Write(">");
                var input = Console.ReadLine();
                if (string.IsNullOrEmpty(input))
                {
                    return;
                }
                parser.Parse(input);
            } while (true);
        }