static void Main(string[] args) { List <int> stones = Console.ReadLine() .Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .ToList(); Lake lake = new Lake(stones); Console.WriteLine(string.Join(", ", lake)); }
public static void Main(string[] args) { int[] stones = Console.ReadLine() .Split(", ", StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .ToArray(); Lake lake = new Lake(stones); Console.WriteLine(string.Join(", ", lake)); }