Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text;
- using System.Collections.Generic;
- class Practic {
- public static string var15(string str) {
- char[] punctuation = { ',', '.', ' ', ';', ':', '?', '!' };
- string[] words = str.Split(punctuation, StringSplitOptions.RemoveEmptyEntries);
- str = String.Join(" ", words);
- return str;
- }
- public static void Main() {
- List < string > str = new List < string > ();
- Console.WriteLine("Введите строки");
- string input = "";
- while ((input = Console.ReadLine()) != "")
- str.Add(input);
- foreach(var s in str) {
- Console.WriteLine(var15(s));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement