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 _02LinqMoreExcercisesStringEncryption
- {
- class Program
- {
- static void Main(string[] args)
- {
- int []commands = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
- int remove = commands[0];
- int take = commands[1];
- List<int> numbers = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
- numbers.RemoveAll(x => x < 65);
- numbers.RemoveAll(x => x > 90);
- numbers.RemoveRange(0, remove);
- numbers.Take(take).ToList();
- List<char>finalstring =numbers.ConvertAll(x => (char)x);
- // finalstring.RemoveRange(0,remove);
- // finalstring.Take(take).ToList();
- Console.WriteLine(string.Join("",finalstring));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment