fb pixel

Number of evens before 0

Given a stream of numbers, the program has to print the number of evens before reaching the first 0.
Input
Output
2 6 1 9 43 88 9 0 4
3
 
To check your solution you need to sign in
Sign in to continue