challenges

Some problem solving programming challenges, i have solved. Not all are here, but started adding them slowly.

This project is maintained by chankruze

Even Numbers

Given a list of numbers, you want to take out all of the odd ones and leave just the even ones.

Task

Evaluate each number in your list to see if it is even or odd. Then, output a new list that only contains the even numbers from your original list.

Input Format

A string that includes all of the integer values in your list separated by spaces.

Output Format

A string that includes all of the even integer values from your first list separated by spaces.

Sample Input

8 10 19 25 5 16 12

Sample Output

8 10 16 12

Explanation

Your new list would only contain the even numbers (8, 10, 16, and 12) and would not include the odd ones (19, 25, and 5). Note, that both, input and output, are strings.

Solutions

Language Solution
C not available
CPP not available
C# not available
Python available
Java not available
Ruby not available
Swift not available