Exemple #1
0
        static void Main(string[] args)
        {
            var L = new Cola <int>();

            for (int i = 0; i < 3; i++)
            {
                L.Push(i + 1);
            }
            for (int i = 0; i < 3; i++)
            {
                Console.Write(L.Pop());
            }
            Console.WriteLine();
            var N    = new Char[] { 'A', 'B', 'C' };
            var text = new Cola <char>(N.Length);

            for (int i = 0; i < N.Length; i++)
            {
                text.Push(N[i]);
            }
            for (int i = 0; i < N.Length; i++)
            {
                Console.Write(text.Pop());
            }
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Cola <string> Lista = new Cola <string>(3);

            Lista.Push("Luevano");
            Lista.Push(" ");
            Lista.Push("Gomez");
            for (int i = 0; i < 3; i++)
            {
                Console.Write(Lista.Pop());
            }
        }
Exemple #3
0
        static void Main(string[] args)
        {
            Cola <string> lista = new Cola <string>(7);

            lista.Push("Hola");
            lista.Push(" ");
            lista.Push("Que tal ,");
            lista.Push(" ");
            lista.Push("Como");
            lista.Push(" ");
            lista.Push("estas?");

            for (int i = 0; i < 7; i++)
            {
                Console.Write(lista.Pop());
            }
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Cola <string> lista = new Cola <string>(7);

            lista.Push("Prueba");
            lista.Push(" ");
            lista.Push("Del");
            lista.Push(" ");
            lista.Push("Programa");
            lista.Push(" ");
            lista.Push("Cola");

            for (int i = 0; i < 7; i++)
            {
                Console.Write(lista.Pop());
            }
        }
Exemple #5
0
        static void Main(string[] args)
        {
            Cola c = new Cola();

            c.Encolar(3);
            c.Encolar(4);
            c.Encolar(5);
            c.Mostrar();
            c.Desencolar();
            c.Mostrar();
            c.Desencolar();
            c.Mostrar();
            c.Desencolar();
            c.Mostrar();
            c.Desencolar();
            c.Mostrar();
        }
Exemple #6
0
        static void Main(string[] args)
        {
            Cola Objn = new Cola(3);

            Objn.InsertarDato(1);
            Objn.InsertarDato(2);
            Objn.InsertarDato(3);
            Objn.Eliminar();
            Console.WriteLine(Objn.Mostrar());
            Objn.Vaciar();
            Console.WriteLine(Objn.Mostrar());
            Objn.InsertarDato(4);
            Objn.InsertarDato(5);
            Objn.InsertarDato(6);
            Objn.InsertarDato(7);
            Console.WriteLine(Objn.Mostrar());
            Console.ReadKey();
        }
Exemple #7
0
        static void Main(string[] args)
        {
            Cola <string> lista = new Cola <string>(7);

            lista.Push("Que");
            lista.Push(" ");
            lista.Push("onda");
            lista.Push(" ");
            lista.Push("profesor");
            lista.Push(" ");
            lista.Push("mariosky");
            //string saludo = lista.Pop();

            /*saludo+=lista.Pop();
            *  saludo+=lista.Pop();*/
            for (int i = 0; i < 7; i++)
            {
                Console.Write(lista.Pop());
            }
        }