Chelsea S. asked
Write a program called Problem3. This program reads in a sequence of X and O and stores them into a 2D array (3 X 3). It also reads an integer (N). The program will look at the 2D array row by row, column by column (and diagonally) to see if it contains three X’s or three O’s. For all rows, columns and the diagonals (top corners to bottom corners) that contain three X’s or three O’s, print the Row number (starts at row 0), Column number (starts at column 0), and the Diagonal (right or left). Read in a sequence of X’s and O’s that would fill a 2D grid (3 x 3) -> three rows and three columns. Print out all the rows, columns and diagonals of matching Os and Xs NOTE THE ORDER TO PRINT: matching rows, then matching columns, then left-hand diagonal and finally right-hand diagonals. There is no output if there are no matches. To make this problem more challenging – create 3 methods: one to find and print the rows, one to find and print the columns and one to find any diagonals. Call the methods from your main method and pass in the 2D array into each method.
August 1st, 2024
Carlos C. answered
Here's a Java solution for Problem3. In this program, we'll define three separate methods to check r...
August 1st, 2024
Create an account to view answers and interact with the community!
I purchased a slideshow maker in 2019 and need to use it on another computer. How can I transfer it without repurchasing?
February 28th, 2023
I have two issues with my Epson WF-3820 printer: 1) The fax install wizard screen is constantly on my main screen, and 2) The wireless connection is inconsistent. I have already reinstalled the drivers and tried to eliminate the fax ability, but the wizard screen remains. What can I do to resolve these issues?
June 6th, 2024
My Acer computer needs updating internet drivers. It says no Internet and won't acknowledge any. I'm using Windows 10 on an approximately 10-year-old desktop. What should I do?
October 3rd, 2024
I'm having trouble resetting my password on both my phone and iPhone (iOS 7). I've tried multiple times to get my password reset, but it hasn't worked. I was told I would receive a code to change it, but I haven't received it. I'm getting very frustrated and can't get past the page that says to wait for a code. What steps can I take to resolve this issue?
February 25th, 2023
I am trying to fix my Google password, but it will not accept my old one. I am having trouble resetting my Google password. What should I do?
March 20th, 2024