Advertisement
osman1997

imenav1

Oct 19th, 2020
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. class Program
  5. {
  6.  
  7. static void Main()
  8. {
  9. List<string> names = new List<string>();
  10.  
  11. string command = string.Empty;
  12.  
  13. while (true)
  14. {
  15.  
  16. command = Console.ReadLine();
  17. if (command == "end")
  18. {
  19. break;
  20. }
  21.  
  22. names.Add(command);
  23. }
  24.  
  25. Console.WriteLine(string.Join(Environment.NewLine, names));
  26.  
  27.  
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement