using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Лаба7 { class Program { static void peredel(string a) { string text = System.IO.File.ReadAllText(a); string[] sent = text.Split(new[] { @"[.;?!]" }, StringSplitOptions.RemoveEmptyEntries); for (int i = 0; i < sent.Length; ++i) { char[] sentchar = sent[i].ToCharArray(); bool check = true; for (int i2 = 0; i2 < sentchar.Length; ++i2) { if (sentchar[i2] == ',') check = false; } if (check) Console.WriteLine(sent[i] + ". "); } } static void Main(string[] args) { peredel(@"D:\1.txt"); } } }