Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace Concurency
- {
- class Program
- {
- static void Main(string[] args)
- {
- List<int> input = Console.ReadLine()
- .Split()
- .Select(x => int.Parse(x))
- .ToList();
- input.RemoveAll(x => x == input[input.Count - 1]);
- Console.WriteLine(string.Join(' ', input));
- // [Втори начин на принтиране на резултата]
- //input.ForEach(x => Console.Write(x + " "));
- // [Трети начин на принтиране на резултата]
- //foreach (var item in input)
- //{
- // Console.Write(item + " ");
- //}
- // [Четвърти начин на принтиране на резултата]
- //for (int i = 0; i < input.Count; i++)
- //{
- // Console.Write(input[i] + " ");
- //}
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement