I can't figure out why this will not work. I am trying to get my loop to cycle through an array checking each variable against 'mod 2'. If array variable mod 2 produces a '0' (being a multiple of 2) then it should replace that number in the array with a zero. Seems simple enough but for some reason I am not getting the correct output. Any help would be appreciated.
Thanks.
#include <iostream>
using namespace std;
int main ()
{
int size = 12;
int the_array [] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};