Karan and Even Numbers - Reloaded

2.6

14 votes
Easy
Problem

You are already aware of Karan's fondness for even numbers. Since you have helped him out in the past, he again reaches out to you for help.

He has a very long list of numbers, but this time, the numbers are in a space separated format. All you need to do is to print the even numbers from the list, one per line. The list ends when -1 is encountered.

Input: The list.

Output: Print even numbers from the list, one per line.

Constraints: -1 <= i <= 10^18

Sample Input
1 3 4 7 9 6 -1
Sample Output
4
6
Time Limit: 5
Memory Limit: 256
Source Limit:
Contributers:
Editor Image

?