Advertisement
tmollov

Untitled

Feb 18th, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace simpleArrays
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12. string[] patern = Console.ReadLine().Split();
  13. string inp = Console.ReadLine();
  14. List<string> list = new List<string>();
  15. while (inp != "end")
  16. {
  17. bool isThere = false;
  18. for (int i = 0; i < patern.Length; i++)
  19. {
  20. if (inp.Contains(patern[i]))
  21. {
  22. isThere= true;
  23. }
  24. }
  25.  
  26. if (isThere != true)
  27. {
  28. list.Add(inp);
  29. }
  30. inp = Console.ReadLine();
  31. }
  32.  
  33. foreach (var a in list.OrderBy(x => x))
  34. {
  35. Console.WriteLine(a);
  36. }
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement