I was just wondering how I could state if x + y + z % 2 == 0 BUT only do this statement IF the three values aren't set to 0. I require the values to be 0.
Example of my code & posStatus may hold variables of the value 0. The problem is when all three of them are 0 an issue occurs. The user and program over time fill in these values.
else if (posStatus[0] + posStatus[4] + posStatus[8] % 2 == 0)
{
if (posStatus[0] == 0)
{
posStatus[0] = 2;
return;
}
else if (posStatus[4] == 0)
{
posStatus[4] = 2;
return;
}
else if (posStatus[8] == 0)
{
posStatus[8] = 2;
return;
}
}