Пример #1
0
        public static void Main(String[] args)
        {
            ListExercises myList = new ListExercises();

            Console.WriteLine("Enter five names, one per line");
            for (int i = 0; i < 5; i++)
            {
                myList.AddNameToList(Console.ReadLine());
            }
            Console.WriteLine("Results are " + myList.GetListAsString());
            Console.ReadLine();
        }
Пример #2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Enter your poem:");
            ListExercises myList = new ListExercises();

            string [] currentWord = Console.ReadLine().Split(' ');
            for (int i = 0; i < currentWord.Length; i++)
            {
                myList.AddNameToList(currentWord[i]);
            }
            Console.WriteLine("");
            Console.WriteLine("Results are " + myList.GetListAsString());
            Console.ReadLine();
        }