Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- namespace advanced
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] input = Console.ReadLine().Split().Select(int.Parse).ToArray();
- Queue<int> queue = new Queue<int>();
- for (int i = 0; i < input.Length; i++)
- {
- if (input[i] % 2 == 0)
- {
- queue.Enqueue(input[i]);
- }
- }
- Console.WriteLine(string.Join(", ", queue));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement