static void Main(string[] args) { stack s = new stack(5); s.push(10); s.pop(); s.print(); s.push(1); s.push(2); }
static void Main(string[] args) { stack One = new stack(3); One.push(1); One.push(2); One.push(3); One.push(4); One.print(); One.pop(); One.pop(); One.pop(); One.pop(); One.print(); }
static void Main(string[] args) { stack s = new stack(5); s.push(4); s.push(3); stack s2 = new stack(4); s2.push(7); s2.push(9); stack s3 = s2 + s; Console.WriteLine(s3.ToString()); //s.push("5"); //s.push("6"); //s.push("7"); //Console.WriteLine(s.ToString()); //s.pop(); //Console.WriteLine(s.ToString()); //stack s = new stack(5); //s.push(2); //s.push(4); //s.push(5); //stack s2 = new stack(s); //s2.push(7); // Console.WriteLine(s.pop()); // Console.WriteLine(s.ToString()); // Console.WriteLine(s2.ToString()); }
static void Main(string[] args) { stack test = new stack(10); test.push(5); test.push(6); test.pop(); test.peek(); stack other = new Stack.stack(5); other.push(1); other.push(2); other.push(500); Console.WriteLine(other.pop() + " has been popped"); other.push(3); other.push(4); other.push(5); other.push(6); other.peek(); Console.ReadLine(); }