Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace homework
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите вашу строку: ");
- string str = Console.ReadLine();
- char delimiterChar =' ';
- string[] words = str.Split(delimiterChar);
- Console.WriteLine("Обнаружено слов: "+ words.Length);
- for (int i=0; i<words.Length;i++)
- {
- Console.WriteLine(i+1 +". " +words[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement