Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- namespace CSLight
- {
- class Program
- {
- private static void Main()
- {
- Queue<int> queue = new Queue<int>(new[] { 123, 234, 345, 656, 44, 7567, 867, 768, 435, 423 });
- int sum = 0;
- while (queue.Count > 0)
- {
- int clientSum = queue.Dequeue();
- Console.WriteLine($"Сумма на счету: {sum} руб.\n" +
- $"Сумма покупки клиента: {clientSum}");
- sum += clientSum;
- Console.ReadKey();
- Console.Clear();
- }
- Console.WriteLine($"За этот день вам удалось заработать {sum} руб.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement