What Approach is there to cout the elements in this array that are even
I have already got an idea but no yet complete
Please Helpp

Code:
double d_array[10] = {3.4, 12.8, 9.5, 2.0, 1.7, 3.8};

for(int i=0; i<6; ++i)
if(d_array[i]%2==0)
cout<<d_array[i];

I know this produces an error but i also know its in the right direction, if somebody can shed some light on this would be greatly appreciated;