Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace AppendLists_Lab2
- {
- public class AppendLists_Lab2
- {
- public static void Main()
- {
- var input = Console.ReadLine()
- .Split('|')
- .ToList();
- List<string> result = new List<string>();
- input.Reverse();
- for (int i = 0; i < input.Count; i++)
- {
- List<int> temp = new List<int>(input[i]
- .Split(' ', StringSplitOptions.RemoveEmptyEntries)
- .Select(int.Parse)
- .ToList());
- result.AddRange(temp);
- }
- foreach (var item in result)
- {
- Console.Write(item + " ");
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement