Advertisement
IGRODELOFF

HW: Split

Nov 11th, 2024
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.48 KB | None | 0 0
  1. using System;
  2.  
  3. namespace homeWorkSplit
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string userInput;
  10.            
  11.             Console.Write("Введите любой текст: ");
  12.  
  13.             userInput = Console.ReadLine();
  14.  
  15.             string[] words = userInput.Split(' ');
  16.  
  17.             foreach (string word in words)
  18.             {
  19.                 Console.WriteLine(word);
  20.             }
  21.         }
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement