HW20
COP-3223H
Submit your answers via webcourses
- Using only your mind and/or pencil and paper (do not compile and run the program), write a program that, given some integer array
a, that has lengthalen, reverses the elements of the arraya. - Using only your mind and/or pencil and paper (do not compile and run the program), write a code snippet that can go inside the tic-tac-toe game loop after each move to check whether the tic-tac-toe win condition has been met. Assume the current board is in a 9-element array called
board, where the charactersXorOare set to some (or all) of the indices. Set the variablewintotrue(1) if the win condition is met orfalse(0) otherwise.