Beispiel #1
0
        static void Main(string[] args)
        {
            List <int> stones = Console.ReadLine().Split(", ", StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();
            Lake       lake   = new Lake(stones);

            Console.WriteLine(string.Join(", ", lake));
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            int[] stones = Console.ReadLine().Split(", ").Select(int.Parse).ToArray();
            Lake  lake   = new Lake(stones.ToList());

            Console.WriteLine(string.Join(", ", lake));
        }
        public static void Main()
        {
            var input = Console.ReadLine().Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList();
            var lake  = new Lake(input);

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

            Console.WriteLine(string.Join(", ", lake));
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            Lake lake = new Lake();

            int[] numbers = Console.ReadLine().Split(new char[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();
            foreach (var number in numbers)
            {
                Stone stone = new Stone(number);
                lake.Collection.Add(stone);
            }
            Console.WriteLine(string.Join(", ", lake));
        }