Advertisement
sokolova4

Задача 4

Dec 10th, 2020
515
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.63 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. namespace _5
  4. {
  5.     class Program
  6.     {
  7.         static char[] Row(char[] line, int beg, string model)
  8.         {
  9.            
  10.             List<char> ans = new List<char>();
  11.             for(int i=beg; i<line.Length; i++)
  12.             {
  13.                 if (model.IndexOf(line[i]) == -1)
  14.                 {
  15.                     ans.Add(line[i]);
  16.                 }
  17.             }
  18.             return ans.ToArray();
  19.         }
  20.         static void Main(string[] args)
  21.         {
  22.            
  23.             Console.WriteLine(new String(Row("fjsingk".ToCharArray(),2,"ik")));
  24.         }
  25.     }
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement