Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- namespace Print_Even_Numbers
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- var passCustomer = new Queue<string>();
- while (input != "End")
- {
- if (input != "Paid")
- {
- passCustomer.Enqueue(input);
- }
- else
- {
- Console.WriteLine(string.Join("\n", passCustomer));
- passCustomer.Clear();
- }
- input = Console.ReadLine();
- }
- Console.WriteLine($"{passCustomer.Count} people remaining.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement