Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading.Tasks;
- using Library;
- namespace Text
- {
- class Program
- {
- static void Print_Index(string[] words)
- {
- for (int i = 0; i < words.Length; i++)
- {
- Console.WriteLine(words[i]);
- }
- }
- static void Print<T>(T[] words)
- {
- foreach (var word in words)
- {
- Console.WriteLine(word);
- }
- }
- static void Main(string[] args)
- {
- string text = "";
- string become = "Ночью ";
- while (become != "Конец")
- {
- Console.WriteLine("Привет! Плести нить сюжета можно ВЕЧНО, однако если Вы все-таки заходите это остановить, то просто напишите: конец. Итак, пора начинать, продолжите предложение:");
- Console.Write(become);
- string continuation = Console.ReadLine();
- string[] words = continuation.Split(' ');
- string one_word = words[words.Length - 1];
- char[] one_letters = one_word.ToCharArray();
- char big_one_letter = Char.ToUpper(one_letters[0]);
- string part = new string(one_letters, 1, one_word.Length - 1);
- text = text + become + continuation + " ";
- string new_one_word = big_one_letter + part;
- Console.Clear();
- become = "";
- char[] new_one_word_char = new_one_word.ToCharArray();
- for (int i = 0; i < new_one_word_char.Length; i++)
- {
- if (Char.IsLetterOrDigit(new_one_word_char[i]) == true)
- {
- become = become + new_one_word_char[i];
- }
- }
- }
- Console.WriteLine("Вот что у Вас получилось: ");
- Console.WriteLine();
- Console.Write(text);
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement