Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            int           k    = 0;
            Random        rnd  = new Random();
            int           rand = rnd.Next(10, 50);
            List <Person> hum  = new List <Person>();

            for (int i = 0; i < rand; i++)
            {
                hum.Add(new Person(k++));
            }
            Seqences Army = new Seqences(hum);

            foreach (var item in Army)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine();
            foreach (var item in Army.ThroughtOne)
            {
                Console.WriteLine(item);
            }
            Console.WriteLine();
            foreach (var item in Army.Passing(10))
            {
                Console.WriteLine(item);
            }
            Console.Read();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Seqences fib = new Seqences(new int[] { 1, 1, 2, 3, 5, 8, 13, 21 });

            foreach (var item in fib)
            {
                Console.WriteLine(item);
            }
            Console.Read();
        }