Răspuns:
#include<iostream>
#include<fstream>
using namespace std;
ifstream fcin("date.in");
ofstream fcout("date.out");
int n,i,x,c,s;
int main()
{
fcin>>n;
for(i=1;i<=n;i++)
{
fcin>>x;
c=x;
s=0;
while(x)
{
s+=x%10;
x/=10;
}
if(s%2==0)fcout<<c<<" ";
}
}
Explicație: