Example #1
0
        static void Main(string[] args)
        {
            int[] stones = Console.ReadLine().Split(", ").Select(int.Parse).ToArray();
            Lake  lake   = new Lake(stones);

            Console.WriteLine(String.Join(", ", lake));
        }
Example #2
0
        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(", ").Select(int.Parse).ToList();

            var stones = new Lake(input);

            Console.WriteLine(string.Join(", ", stones));
        }
Example #3
0
        public static void Main(string[] args)
        {
            int[] stones = Console.ReadLine()
                           .Split(", ", StringSplitOptions.RemoveEmptyEntries)
                           .Select(int.Parse)
                           .ToArray();

            Lake <int> lake = new Lake <int>(stones);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #4
0
        public static void Main()
        {
            var elements = Console.ReadLine()
                           .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                           .Select(int.Parse)
                           .ToArray();

            var lake = new Lake <int>(elements);

            Console.WriteLine(string.Join(", ", lake));
        }
Example #5
0
        public static void Main()
        {
            int[] numbers = Console.ReadLine()
                            .Split(", ")
                            .Select(int.Parse)
                            .ToArray();

            Lake lake = new Lake(numbers);

            List <int> result = new List <int>();

            foreach (var item in lake)
            {
                result.Add(item);
            }

            Console.WriteLine(string.Join(", ", result));
        }
Example #6
0
        public static void Main()
        {
            Lake lake = new Lake(Console.ReadLine().Split(", ").Select(int.Parse).ToArray());

            Console.WriteLine(string.Join(", ", lake));
        }