222k views
3 votes
A 2-dimensional 3x3 array of ints, has been created and assigned to tictactoe. Write an expression whose value is true if the elements of any row or column or diagonal are equal.

This is my current java code, and I'm definitely missing something, any help would be appreciated:
tictactoe[0][0] == tictactoe[0][1] && tictactoe[0][0] == tictactoe[0][2] || tictactoe[0][0] == tictactoe[1][0] && tictactoe[1][0] == tictactoe[2][0] || tictactoe[0][2] == tictactoe[1][1] && tictactoe[0][2] == tictactoe[2][0];

User Md Aslam
by
6.1k points

1 Answer

3 votes

Answer:it looks complete d to me

Step-by-step explanation:

it looks like you have all of it

User Gustavo Rodrigues
by
6.6k points