public static void Main() { int[] arr = Console.ReadLine() .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .ToArray(); QuickSort <int> .Sort(arr); Console.WriteLine(string.Join(" ", arr)); }
public static void Main(string[] args) { int[] numbers = Console.ReadLine() .Split() .Select(int.Parse) .ToArray(); QuickSort <int> .Sort(numbers); Console.WriteLine(string.Join(" ", numbers)); }
static void Main() { string inputLine = Console.ReadLine()?.Trim(); if (string.IsNullOrEmpty(inputLine)) { return; } int[] numbers = inputLine .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(int.Parse) .ToArray(); QuickSort.Sort(numbers); Console.WriteLine(string.Join(" ", numbers)); }