I am creating a tic tac toe program for class. The kicker is that we have to use logic and arithmetic to solve whether the player has won.I am good on the columns and rows but am stumped on the diagonal. I am required to use a 2D char array and cannot hard code it with if statements. Any ideas???
He stated that he cannot use hard-coded ifs, which is about the core of your program. Using some simple algebra for this is a lot more efficient (when done right), it also requires an advanced view on this topic - hard coding is a lot below that level.