#C14317. Filter Even Numbers
Filter Even Numbers
Filter Even Numbers
You are given a list of integers. Your task is to filter out all the odd numbers and print only the even numbers in the order they appear in the list.
The input is provided via stdin and the output should be printed to stdout. The first line of input contains an integer \( n \) representing the number of elements. The second line contains \( n \) space-separated integers. If there are no even numbers, output an empty line.
Example:
Input:
6
10 15 20 25 30 35
Output:
10 20 30
inputFormat
The input consists of two lines. The first line contains an integer \( n \) which denotes the number of integers. The second line contains \( n \) space-separated integers.
outputFormat
Print a single line containing all the even numbers from the list in the same order as they appear, separated by a single space. If there are no even numbers, print an empty line.
## sample6
10 15 20 25 30 35
10 20 30
</p>