Even numbers
EASYGiven an input string with numbers separated by a single space.
Find all even numbers and print it separated by a single space. The order should be the same as the input.
Example #1
Input
1 2 3 4 5 6 7 8 9
Output
2 4 6 8
Given an input string with numbers separated by a single space.
Find all even numbers and print it separated by a single space. The order should be the same as the input.
1 2 3 4 5 6 7 8 9
2 4 6 8