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) {
- string[] words = str.Split(' ');
- for(int i = 0; i<words.Length; ++i){
- if(words[i].Length < 5) words[i] = "";
- }
- 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