Advertisement
Vapio

task12

Jul 27th, 2022
882
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5.     public static void Main(string[] args)
  6.     {
  7.         string stringRead = "";
  8.         char characterSplit = ' ';
  9.  
  10.         Console.WriteLine("Input a string : ");
  11.         stringRead = Console.ReadLine();
  12.  
  13.         string[] stringsSplit = stringRead.Split(characterSplit);
  14.  
  15.         foreach(string element in stringsSplit)
  16.             Console.WriteLine(element);
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement