Advertisement
obedmarsh

02. String Decryption

Jul 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace _07.TravellCompany
  8. {
  9.  
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.  
  15.             int[] arr = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
  16.             int m = arr[0];
  17.             int n = arr[1];
  18.             List<int> list = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
  19.             List<int> letterList = new List<int>();
  20.             letterList = list.Where(x => x >= 65 && x <= 90).Skip(m).Take(n).Select(x => x).ToList();
  21.  
  22.             foreach (var item in letterList)
  23.             {
  24.                 Console.Write((char) item);
  25.             }
  26.         }
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement