Advertisement
Spocoman

07. Append Arrays

Feb 1st, 2022
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4.  
  5. namespace AppendArrays
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.  
  12.             List<string> lists = Console.ReadLine()
  13.                 .Split('|', StringSplitOptions.RemoveEmptyEntries)
  14.                 .Reverse()
  15.                 .ToList();
  16.  
  17.             List<int> print = string.Join(" ", lists)
  18.                 .Split(' ', StringSplitOptions
  19.                 .RemoveEmptyEntries)
  20.                 .Select(int.Parse)
  21.                 .ToList();
  22.  
  23.             Console.WriteLine(string.Join(" ", print));
  24.         }
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement