Advertisement
Bubeto

Untitled

Jan 15th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. namespace Print_Even_Numbers
  6. {
  7. class Program
  8. {
  9. static void Main(string[] args)
  10. {
  11. string input = Console.ReadLine();
  12. var passCustomer = new Queue<string>();
  13.  
  14.  
  15. while (input != "End")
  16. {
  17.  
  18. if (input != "Paid")
  19. {
  20.  
  21. passCustomer.Enqueue(input);
  22.  
  23. }
  24. else
  25. {
  26. Console.WriteLine(string.Join("\n", passCustomer));
  27. passCustomer.Clear();
  28. }
  29. input = Console.ReadLine();
  30.  
  31. }
  32.  
  33. Console.WriteLine($"{passCustomer.Count} people remaining.");
  34. }
  35.  
  36. }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement