Пример #1
0
        /// <summary>
        /// 将infix转换为postfix后进行计算
        /// </summary>
        public static void infixAndPostfixTest()
        {
            char[]         infixArray = "4+4/2+(4*5-2^(2^2))*1".ToCharArray();
            InfixToPostfix infix      = new InfixToPostfix();
            Postfix        postfix    = new Postfix();

            string[] postfixArray = infix.Translate(infixArray);
            string   result       = postfix.GetResult(postfixArray);

            System.Console.WriteLine(result);
        }
Пример #2
0
        public static void InfixToPostfixTest()
        {
            InfixToPostfix infix = new InfixToPostfix();

            infix.Translate();
        }