favorite We need a little bit of your help to keep things running, click on this banner to learn more

Quick start C

Print array 5

Array of n integers is given. Print all its even elements, reversing their original order.


First line contains number n (1n100). Second line contains n integers, each no more than 100 by absolute value.


In the first line print the number of even elements in array. In the second line print the even elements in the reverse order. If there are no even elements in the array, print "NO".

Time limit 1 second
Memory limit 128 MiB
Input example #1
-2 5 4 -3 7 -1 0
Output example #1
0 4 -2
Author Matviychuk Sergiy Volodymyrovych
Source "ABC programming"