I am looking to create a program like the following (c# btw):
int[] arr = new int[9] //some code that puts values 1, 0, or 2 in each array element for(int i
You could try the following expression inside your if statement.
if
arr[i] == arr[(i + 3) % arr.Length];
The % Operator
Divides the value of one expression by the value of another, and returns the remainder.