UP | HOME

HW20
COP-3223H

Submit your answers via webcourses

  1. 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 length alen, reverses the elements of the array a.
  2. 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 characters X or O are set to some (or all) of the indices. Set the variable win to true (1) if the win condition is met or false (0) otherwise.

Author: Paul Gazzillo

Created: 2026-03-01 Sun 22:38

Validate