static void Main(string[] args) { IntStack stack = new IntStack(4); stack.Push("5"); stack.Push("4"); stack.Push("3"); stack.Push("+"); stack.Pop(); //stack.Pop(); //stack.Clear(); if (stack.Contains("4")) { Console.WriteLine("Found X"); } else { Console.WriteLine("Not found X"); } //stack.Pop(); stack.Xuat(); MyExpression n = new MyExpression("1+18+ 2* 9+ 5"); n.Xuat(); }
static void Main(string[] args) { Random random = new Random(); IntStack stack = new IntStack(); while (!stack.IsFull()) { stack.Push(random.Next(100)); } while (!stack.IsEmpty()) { Console.WriteLine(stack.Pop()); } System.Console.ReadKey(); }