Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var  inputStones = Console.ReadLine().Split(", ").Select(int.Parse).ToArray();
            Lake lake        = new Lake(inputStones);

            Console.WriteLine(string.Join(", ", lake));
        }
        static void Main(string[] args)
        {
            int[] stones = Console.ReadLine().Split(new char[] { ' ', ',' },
                                                    StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToArray();

            var lake = new Lake(stones);

            Console.WriteLine(string.Join(", ", lake));
        }
Exemplo n.º 3
0
        public static void Main(string[] args)
        {
            var numbers = Console.ReadLine()
                          .Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries)
                          .Select(int.Parse)
                          .ToArray();

            var lake = new Lake(numbers);

            Console.WriteLine(string.Join(", ", lake));
        }
        public static void Main()
        {
            var stones = Console.ReadLine()
                         .Split(", ", StringSplitOptions.RemoveEmptyEntries)
                         .Select(int.Parse)
                         .ToArray();

            var lake = new Lake(stones);

            Console.WriteLine(String.Join(", ", lake));
        }
Exemplo n.º 5
0
        public static void Main()
        {
            int[] stoneValues = Console.ReadLine()
                                .Split(", ")
                                .Select(int.Parse)
                                .ToArray();

            Lake lake = new Lake(stoneValues);

            Console.WriteLine(string.Join(", ", lake));
        }
Exemplo n.º 6
0
        public static void Main()
        {
            var input = Console.ReadLine()
                        .Split(", ")
                        .Select(int.Parse)
                        .ToList();

            var stones = new Lake(input);

            Console.WriteLine(string.Join(", ", stones));
        }
Exemplo n.º 7
0
        static void Main()
        {
            var inputStones = Console.ReadLine()
                              .Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries)
                              .Select(int.Parse)
                              .ToArray();

            var lake = new Lake <int>(inputStones);
            //Console.WriteLine(string.Join(", ",lake));
            var sb = new StringBuilder();

            foreach (var stone in lake)
            {
                sb.Append(stone + ", ");
            }
            var length = sb.ToString().Length;
            var result = sb.ToString().Substring(0, length - 2);

            Console.WriteLine(result);
        }
Exemplo n.º 8
0
        static void Main()
        {
            var lake = new Lake(Console.ReadLine().Split(new[] { ' ', ',' }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse).ToList());

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