Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace variables
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<int> list = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
- string listString = Console.ReadLine();
- int index = 0;
- int number = 0;
- while (listString != "end")
- {
- index = Convert.ToInt32( listString.Substring(0,1));
- list.Insert(index, Convert.ToInt32(listString));
- listString = Console.ReadLine();
- }
- Console.WriteLine(string.Join(" ", list));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement