Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace AppendArrays
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<string> numbers = Console.ReadLine()
- .Split('|')
- .Reverse()
- .ToList();
- List<int> newNumbers = new List<int>();
- foreach (string element in numbers)
- {
- newNumbers.AddRange(element.Split(" ", StringSplitOptions.RemoveEmptyEntries)
- .Select(int.Parse)
- .ToList()
- );
- }
- Console.Write(string.Join(' ', newNumbers));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement