Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- class Program
- {
- static void Main()
- {
- List<string> names = new List<string>();
- string command = string.Empty;
- while (command != "end")
- {
- command = Console.ReadLine();
- names.Add(command);
- }
- names.RemoveAt(names.Count - 1);
- for (int i = 0; i < names.Count; i++)
- {
- Console.WriteLine(names[i]);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement