Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApp1
- {
- public class Program
- {
- private static void Main()
- {
- Console.WriteLine("Введите строку");
- string line = Console.ReadLine();
- var str = new StringBuilder();
- foreach (var word in line.Split(" "))
- {
- //Чистим слово от всяких точек, кавычек и прочего
- var tmp = new string(word.Where(char.IsLetter).ToArray());
- //Если слово 4 буквенное, не добавляем
- if (tmp.Length != 4) str.Append(word + " ");
- }
- Console.WriteLine(str.ToString());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement