Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace _02._Append_Lists
- {
- class AppendedLists
- {
- static void Main(string[] args)
- {
- List<List<string>> outerList = Console.ReadLine()
- .Split('|')
- .Reverse()
- .Select
- (
- s => s.Split(new char[] { ' ' },
- StringSplitOptions.RemoveEmptyEntries).ToList()
- )
- .ToList();
- foreach (var inerList in outerList)
- {
- Console.Write(string.Join(" ", inerList) + " ");
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment