Advertisement
MyOnAsSalat

Untitled

Feb 16th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4.  
  5. namespace ConsoleApp3
  6. {
  7.     class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             char[] sz = {'б', 'в', 'г', 'д', 'ж', 'з', 'л', 'м', 'н', 'р'};
  12.             string[] s = Console.ReadLine().Split(new[] {',','.'}, StringSplitOptions.RemoveEmptyEntries).ToArray();
  13.             Console.WriteLine(String.Join(", ", sz.Except(s.Select((item, index) => new { Item = item, Index = index }).Where(n => n.Index % 2 == 0).Select(n => n.Item).SelectMany(x=> x.ToCharArray()))));
  14.         }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement