I have a assignment and got confused on this problem any tip how to solve this
Call a method named printCol that will print the contents of the col number referenced above, one item per line. Do this using a for or a while loop- and any other structures needed.
a) Declare and initialize a two-D array of integers containing 8 rows and 8 columns. The diagonal cells that run from upper left to lower right contain the integer 1. The other cells contain 0.
b) Prompt the user to enter a row number and a column number - these will be used below.
c) Populate the array as described above using either a for loop or a while loop.
2. Call a method named printArray that will print the contents of the array, 8 numbers per line
3. Call a method named printCol that will print the contents of the col number referenced above, one item per line. Do this using a for or a while loop- and any other structures needed.
4. Call a method named printRow that will print the contents of the row number referenced above, all on one line with a space between each. Do this using a for or a while loop - and any other structures needed.
5. Call a method named printDiagonal that will print the numbers on the diagonal, all on the same line, with a space between. Do this using a for or a while loop - and any other structures needed.
In the main() you have a variable for column number, whose value you get from the user. You also have a "two-D array" and some other variables. Then, in main(), you do call a function whose name is "printCol".
The function must take some arguments. What information does one need to print a column of an array?
Have you already written a "printArray" or "printRow"?