#C6696. Filter Even Numbers
Filter Even Numbers
Filter Even Numbers
Given a list of integers, your task is to filter out the even numbers and output them in the same order as they appear in the input. An integer n is considered even if it satisfies the condition \( n \mod 2 = 0 \).
You should read the input from standard input (stdin) and write the result to standard output (stdout).
inputFormat
The input consists of two lines. The first line contains a single integer \( n \) representing the number of integers. The second line contains \( n \) space-separated integers.
outputFormat
Output the even numbers from the list in the order they appear, separated by a single space. If there are no even numbers, output an empty line.
## sample6
1 2 3 4 5 6
2 4 6