Пример #1
0
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            BoxStore <string> boxStore = new BoxStore <string>();

            for (int i = 0; i < n; i++)
            {
                string       valueInput = Console.ReadLine();
                Box <string> stringBox  = new Box <string>(valueInput);
                boxStore.AddBox(stringBox);
            }

            string value   = Console.ReadLine();
            int    counter = boxStore.GetCount(value);

            Console.WriteLine(counter);
        }
Пример #2
0
        static void Main(string[] args)
        {
            int rows = int.Parse(Console.ReadLine());
            BoxStore <double> boxesList = new BoxStore <double>();

            for (int i = 0; i < rows; i++)
            {
                double       input   = double.Parse(Console.ReadLine());
                Box <double> currBox = new Box <double>(input);
                boxesList.AddBox(currBox);
            }
            boxesList.SwapBoxes(1, 2);

            double argument = double.Parse(Console.ReadLine());
            int    result   = boxesList.CountBiggerValues(argument);

            Console.WriteLine(result);
        }