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