Advertisement
YORDAN2347

MergingLists

Mar 25th, 2021
706
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace MergingLists
  5. {
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             char[] splitters = new char[]
  11.             {
  12.                 ' ',
  13.                 '|'
  14.             };
  15.             int[] nums = (Console.ReadLine()
  16.                 .Split(splitters , StringSplitOptions.RemoveEmptyEntries)
  17.                 .Select(int.Parse)
  18.                 .ToArray());
  19.             Console.WriteLine(string.Join(" ", nums));
  20.         }
  21.     }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement