Advertisement
AziLif

Split

Dec 6th, 2024 (edited)
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string textExercise = " В этом предложении достаточно много букв, но не смотря на это текст весьма " +
  10.                 "читабелен и интересен. Кроме того " +
  11.                 "он в полной мере отвечает требованиям!";
  12.  
  13.             string[] arrayTextFromTask = textExercise.Split(' ');
  14.  
  15.             Console.WriteLine($"Изначальная строка - {textExercise}");
  16.  
  17.             foreach (var word in arrayTextFromTask)
  18.                 Console.WriteLine(word);
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement