示例#1
0
 static void Main(string[] args)
 {
     while (true)
     {
         Console.WriteLine("Enter Infix Expression");
         string expression = Console.ReadLine();
         if (string.IsNullOrWhiteSpace(expression))
         {
             break;
         }
         try
         {
             Console.WriteLine(ExpressionCalculator.ProcessExpression(expression));
         }
         catch (Exception ex)
         {
             Console.WriteLine(ex.ToString());
         }
     }
 }