Ok, I'm glad you are making progress.
Type: Posts; User: Norm
Ok, I'm glad you are making progress.
Ok, that could be 8 if statements, one for each case.
For example to test boolArray's contents for
case 1: all true:
if(boolArray[i] && boolArray[i+1] && boolArray[i+2])
and case 8: all false:...
There are only two operands in any comparison.
With three different binary values there can be 8 different combinations: T,T,T to F,F,F
Which of those 8 combinations do you want to test for?
...
You can use the == operator to compare two boolean values:
if(theArray[i] == theArray[idx2]) { // compare two values in an array
Note: you do not need to use == true to test a boolean...